home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / tpwin31.zip / MMSYSTEM.PAS < prev    next >
Pascal/Delphi Source File  |  1992-04-06  |  79KB  |  2,137 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       Turbo Pascal for Windows Run-time Library       }
  4. {       Windows 3.1 API Interface Unit                  }
  5. {       Multimedia Interface unit                       }
  6. {                                                       }
  7. {       Copyright (c) 1992 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit MMSystem;
  12.  
  13. interface
  14.  
  15. uses WinTypes, WinProcs, Win31;
  16.  
  17.  
  18. {***************************************************************************
  19.  
  20.                     General constants and data types
  21.  
  22. ***************************************************************************}
  23.  
  24. { general constants }
  25. const
  26.   MaxPNameLen      =  32;    { max product name length (including NULL) }
  27.   MaxErrorLength   = 128;    { max error text length (including NULL) }
  28.  
  29. { general data types }
  30. type
  31.   Version = Word;             { major (high byte), minor (low byte) }
  32.  
  33. { types for wType field in MMTIME struct }
  34. const
  35.   time_MS         = $0001;  { time in milliseconds }
  36.   time_Samples    = $0002;  { number of wave samples }
  37.   time_Bytes      = $0004;  { current byte offset }
  38.   time_SMPTE      = $0008;  { SMPTE time }
  39.   time_MIDI       = $0010;  { MIDI time }
  40.  
  41. { MMTIME data structure }
  42. type
  43.   PMMTime = ^TMMTime;
  44.   TMMTime = record
  45.     case wType: Word of        { indicates the contents of the variant record }
  46.      time_MS : (ms: Longint);
  47.      time_Samples : (sample: Longint);
  48.      time_Bytes : (cb: Longint);
  49.      time_SMPTE : (
  50.         hour: Byte;
  51.         min: Byte;
  52.         sec: Byte;
  53.         frame: Byte;
  54.         fps: Byte;
  55.         dummy: Byte);
  56.       time_MIDI : (songptrpos: Longint);
  57.   end;
  58.  
  59.  
  60. {***************************************************************************
  61.  
  62.                     Multimedia Extensions Window Messages
  63.  
  64. ***************************************************************************}
  65.  
  66. { joystick }
  67. const
  68.   mm_Joy1Move         = $3A0;
  69.   mm_Joy2Move         = $3A1;
  70.   mm_Joy1ZMove        = $3A2;
  71.   mm_Joy2ZMove        = $3A3;
  72.   mm_Joy1ButtonDown   = $3B5;
  73.   mm_Joy2ButtonDown   = $3B6;
  74.   mm_Joy1ButtonUp     = $3B7;
  75.   mm_Joy2ButtonUp     = $3B8;
  76.  
  77. { MCI }
  78.   mm_MCINotify        = $3B9;
  79.  
  80. { waveform output }
  81.   mm_WOM_Open         = $3BB;
  82.   mm_WOM_Close        = $3BC;
  83.   mm_WOM_Done         = $3BD;
  84.  
  85. { waveform input }
  86.   mm_WIM_Open         = $3BE;
  87.   mm_WIM_Close        = $3BF;
  88.   mm_WIM_Data         = $3C0;
  89.  
  90. { MIDI input }
  91.   mm_MIM_Open         = $3C1;
  92.   mm_MIM_Close        = $3C2;
  93.   mm_MIM_Data         = $3C3;
  94.   mm_MIM_LongData     = $3C4;
  95.   mm_MIM_Error        = $3C5;
  96.   mm_MIM_LongError    = $3C6;
  97.  
  98. { MIDI output }
  99.   mm_MOM_Open         = $3C7;
  100.   mm_MOM_Close        = $3C8;
  101.   mm_MOM_Done         = $3C9;
  102.  
  103.  
  104. {***************************************************************************
  105.  
  106.                 String resource number bases (internal use)
  107.  
  108. ***************************************************************************}
  109.  
  110. const
  111.   mmsyserr_Base          = 0;
  112.   waverr_Base            = 32;
  113.   midierr_Base           = 64;
  114.   timerr_Base            = 96;
  115.   joyerr_Base            = 160;
  116.   mcierr_Base            = 256;
  117.  
  118.   mci_String_Offset      = 512;
  119.   mci_VD_Offset          = 1024;
  120.   mci_CD_Offset          = 1088;
  121.   mci_Wave_Offset        = 1152;
  122.   mci_Seq_Offset         = 1216;
  123.  
  124. {***************************************************************************
  125.  
  126.                         General error return values
  127.  
  128. ***************************************************************************}
  129.  
  130. { general error return values }
  131. const
  132.   mmsyserr_NoError      = 0;                  { no error }
  133.   mmsyserr_Error        = mmsyserr_Base + 1;  { unspecified error }
  134.   mmsyserr_BadDeviceID  = mmsyserr_Base + 2;  { device ID out of range }
  135.   mmsyserr_NotEnabled   = mmsyserr_Base + 3;  { driver failed enable }
  136.   mmsyserr_Allocated    = mmsyserr_Base + 4;  { device already allocated }
  137.   mmsyserr_InvalHandle  = mmsyserr_Base + 5;  { device handle is invalid }
  138.   mmsyserr_NoDriver     = mmsyserr_Base + 6;  { no device driver present }
  139.   mmsyserr_NoMem        = mmsyserr_Base + 7;  { memory allocation error }
  140.   mmsyserr_NotSupported = mmsyserr_Base + 8;  { function isn't supported }
  141.   mmsyserr_BadErrNum    = mmsyserr_Base + 9;  { error value out of range }
  142.   mmsyserr_InvalFlag    = mmsyserr_Base + 10; { invalid flag passed }
  143.   mmsyserr_InvalParam   = mmsyserr_Base + 11; { invalid parameter passed }
  144.   mmsyserr_LastError    = mmsyserr_Base + 11; { last error in range }
  145.  
  146. {***************************************************************************
  147.  
  148.                         Installable driver support
  149.  
  150. ***************************************************************************}
  151.  
  152.  
  153. { return values from DriverProc() function }
  154. const
  155.   drv_Cancel             = drvcnf_Cancel;
  156.   drv_OK                 = drvcnf_OK;
  157.   drv_Restart            = drvcnf_Restart;
  158.  
  159.   drv_MCI_First          = drv_Reserved;
  160.   drv_MCI_Last           = drv_Reserved + $FFF;
  161.  
  162.  
  163. {***************************************************************************
  164.  
  165.                           Driver callback support
  166.  
  167. ***************************************************************************}
  168.  
  169. { flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and }
  170. { midiOutOpen() to specify the type of the dwCallback parameter. }
  171.  
  172. const
  173.   CallBack_TypeMask   = $00070000;    { callback type mask }
  174.   CallBack_Null       = $00000000;    { no callback }
  175.   CallBack_Window     = $00010000;    { dwCallback is a HWND }
  176.   CallBack_Task       = $00020000;    { dwCallback is a HTASK }
  177.   CallBack_Function   = $00030000;    { dwCallback is a FARPROC }
  178.  
  179. { driver callback prototypes }
  180.  
  181.  
  182. type
  183.   TDrvCallBack = procedure(h: Word; uMessage: Word; dwUser: Longint;
  184.     dw1: Longint; dw2: Longint);
  185.  
  186.  
  187. {***************************************************************************
  188.  
  189.                          Manufacturer and product IDs
  190.  
  191.     Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
  192.     MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
  193.  
  194. ***************************************************************************}
  195.  
  196. { manufacturer IDs }
  197. const
  198.   mm_Microsoft            = 1;       { Microsoft Corp. }
  199.  
  200. { product IDs }
  201.   mm_MIDI_Mapper          = 1;       { MIDI Mapper }
  202.   mm_Wave_Mapper          = 2;       { Wave Mapper }
  203.  
  204.   mm_SndBlst_MidiOut      = 3;       { Sound Blaster MIDI output port }
  205.   mm_SndBlst_MidiIn       = 4;       { Sound Blaster MIDI input port  }
  206.   mm_SndBlst_Synth        = 5;       { Sound Blaster internal synthesizer }
  207.   mm_SndBlst_WaveOut      = 6;       { Sound Blaster waveform output }
  208.   mm_SndBlst_WaveIn       = 7;       { Sound Blaster waveform input }
  209.  
  210.   mm_Adlib                = 9;       { Ad Lib-compatible synthesizer }
  211.  
  212.   mm_MPU401_MidiOut       = 10;      { MPU401-compatible MIDI output port }
  213.   mm_MPU401_MidiIn        = 11;      { MPU401-compatible MIDI input port }
  214.  
  215.   mm_PC_Joystick          = 12;      { Joystick adapter }
  216.  
  217.  
  218. {***************************************************************************
  219.  
  220.                     General MMSYSTEM support
  221.  
  222. ***************************************************************************}
  223.  
  224. function mmsystemGetVersion: Word;
  225. procedure OutputDebugStr(P: PChar);
  226.  
  227.  
  228. {***************************************************************************
  229.  
  230.                             Sound support
  231.  
  232. ***************************************************************************}
  233.  
  234. function sndPlaySound(lpszSoundName: PChar; uFlags: Word): Bool;
  235.  
  236. { flag values for wFlags parameter }
  237. const
  238.   snd_Sync            = $0000;  { play synchronously (default) }
  239.   snd_Async           = $0001;  { play asynchronously }
  240.   snd_NoDefault       = $0002;  { don't use default sound }
  241.   snd_Memory          = $0004;  { lpszSoundName points to a memory file }
  242.   snd_Loop            = $0008;  { loop the sound until next sndPlaySound }
  243.   snd_NoStop          = $0010;  { don't stop any currently playing sound }
  244.  
  245.  
  246. {***************************************************************************
  247.  
  248.                         Waveform audio support
  249.  
  250. ***************************************************************************}
  251.  
  252. { waveform audio error return values }
  253. const
  254.   waverr_BadFormat      = waverr_Base + 0;    { unsupported wave format }
  255.   waverr_StillPlaying   = waverr_Base + 1;    { still something playing }
  256.   waverr_Unprepared     = waverr_Base + 2;    { header not prepared }
  257.   waverr_Sync           = waverr_Base + 3;    { device is synchronous }
  258.   waverr_LastError      = waverr_Base + 3;    { last error in range }
  259.  
  260. { waveform audio data types }
  261. type
  262.   PHWave = ^HWave;
  263.   HWave = Word;
  264.  
  265.   PHWaveIn = ^HWaveIn;
  266.   HWaveIn = Word;
  267.  
  268.   PHWaveOut = ^HWaveOut;
  269.   HWaveOut = Word;
  270.  
  271. type
  272.   TWaveCallBack = TDrvCallBack;
  273.  
  274. { wave callback messages }
  275. const
  276.   wom_Open        = mm_WOM_Open;
  277.   wom_Close       = mm_WOM_Close;
  278.   wom_Done        = mm_WOM_Done;
  279.   wim_OPEN        = mm_WIM_Open;
  280.   wim_CLOSE       = mm_WIM_Close;
  281.   wim_DATA        = mm_WIM_Data;
  282.  
  283. { device ID for wave device mapper }
  284.   wave_Mapper     = -1;
  285.  
  286. { flags for dwFlags parameter in waveOutOpen() and waveInOpen() }
  287.   wave_Format_Query     = $0001;
  288.   wave_AllowSync        = $0002;
  289.  
  290. { wave data block header }
  291. type
  292.   PWaveHdr = ^TWaveHdr;
  293.   TWaveHdr = record
  294.     lpData: PChar;                 { pointer to locked data buffer }
  295.     dwBufferLength: Longint;         { length of data buffer }
  296.     dwBytesRecorded: Longint;     { used for input only }
  297.     dwUser: Longint;              { for client's use }
  298.     dwFlags: Longint;             { assorted flags (see defines) }
  299.     dwLoops: Longint;             { loop control counter }
  300.     lpNext: PWaveHdr;             { reserved for driver }
  301.     reserved: Longint;            { reserved for driver }
  302.   end;
  303.  
  304.  
  305. { flags for dwFlags field of WAVEHDR }
  306. const
  307.   whdr_Done       = $00000001;  { done bit }
  308.   whdr_Prepared   = $00000002;  { set if this header has been prepared }
  309.   whdr_BeginLoop  = $00000004;  { loop start block }
  310.   whdr_EndLoop    = $00000008;  { loop end block }
  311.   whdr_InQueue    = $00000010;  { reserved for driver }
  312.  
  313. { waveform output device capabilities structure }
  314. type
  315.  
  316.   PWaveOutCaps = ^TWaveOutCaps;
  317.   TWaveOutCaps = record
  318.     wMid: Word;                 { manufacturer ID }
  319.     wPid: Word;                 { product ID }
  320.     vDriverVersion: Version;       { version of the driver }
  321.     szPname: array[0..MaxPNameLen-1] of Char;  { product name (NULL terminated string) }
  322.     dwFormats: Longint;          { formats supported }
  323.     wChannels: Word;            { number of sources supported }
  324.     dwSupport: Longint;          { functionality supported by driver }
  325.   end;
  326.  
  327.  
  328. { flags for dwSupport field of WAVEOUTCAPS }
  329. const
  330.   wavecaps_Pitch          = $0001;   { supports pitch control }
  331.   wavecaps_PlaybackRate   = $0002;   { supports playback rate control }
  332.   wavecaps_Volume         = $0004;   { supports volume control }
  333.   wavecaps_LRVolume       = $0008;   { separate left-right volume control }
  334.   wavecaps_Sync           = $0010;
  335.  
  336. { waveform input device capabilities structure }
  337. type
  338.   PWaveInCaps = ^TWaveInCaps;
  339.   TWaveInCaps = record
  340.     wMid: Word;                   { manufacturer ID }
  341.     wPid: Word;                   { product ID }
  342.     vDriverVersion: Version;         { version of the driver }
  343.     szPname: array[0..MaxPNameLen-1] of Char;    { product name (NULL terminated string) }
  344.     dwFormats: Longint;            { formats supported }
  345.     wChannels: Word;              { number of channels supported }
  346.   end;
  347.  
  348.  
  349. { defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS }
  350. const
  351.   wave_InvalidFormat     = $00000000;       { invalid format }
  352.   wave_Format_1M08       = $00000001;       { 11.025 kHz, Mono,   8-bit  }
  353.   wave_Format_1S08       = $00000002;       { 11.025 kHz, Stereo, 8-bit  }
  354.   wave_Format_1M16       = $00000004;       { 11.025 kHz, Mono,   16-bit }
  355.   wave_Format_1S16       = $00000008;       { 11.025 kHz, Stereo, 16-bit }
  356.   wave_Format_2M08       = $00000010;       { 22.05  kHz, Mono,   8-bit  }
  357.   wave_Format_2S08       = $00000020;       { 22.05  kHz, Stereo, 8-bit  }
  358.   wave_Format_2M16       = $00000040;       { 22.05  kHz, Mono,   16-bit }
  359.   wave_Format_2S16       = $00000080;       { 22.05  kHz, Stereo, 16-bit }
  360.   wave_Format_4M08       = $00000100;       { 44.1   kHz, Mono,   8-bit  }
  361.   wave_Format_4S08       = $00000200;       { 44.1   kHz, Stereo, 8-bit  }
  362.   wave_Format_4M16       = $00000400;       { 44.1   kHz, Mono,   16-bit }
  363.   wave_Format_4S16       = $00000800;       { 44.1   kHz, Stereo, 16-bit }
  364.  
  365. { general waveform format structure (information common to all formats) }
  366. type
  367.   PWaveFormat = ^TWaveFormat;
  368.   TWaveFormat = record
  369.     wFormatTag: Word;         { format type }
  370.     nChannels: Word;          { number of channels (i.e. mono, stereo, etc.) }
  371.     nSamplesPerSec: Longint;  { sample rate }
  372.     nAvgBytesPerSec: Longint; { for buffer estimation }
  373.     nBlockAlign: Word;      { block size of data }
  374.   end;
  375.  
  376. { flags for wFormatTag field of WAVEFORMAT }
  377. const
  378.   wave_Format_PCM     = 1;
  379.  
  380. { specific waveform format structure for PCM data }
  381. type
  382.   PPCMWaveFormat = ^TPCMWaveFormat;
  383.   TPCMWaveFormat = record
  384.       wf: TWaveFormat;
  385.       wBitsPerSample: Word;
  386.    end;
  387.  
  388. { waveform audio function prototypes }
  389. function waveOutGetNumDevs: Word;
  390.  
  391. function waveOutGetDevCaps(uDeviceID: Word; lpCaps: PWaveOutCaps;
  392.                            uSize: Word): Word;
  393.  
  394. function waveOutGetVolume(uDeviceID: Word; lpdwVolume: PLongint): Word;
  395. function waveOutSetVolume(uDeviceID: Word; dwVolume: Longint): Word;
  396. function waveOutGetErrorText(uError: Word; lpText: PChar; uSize: Word): Word;
  397. function waveOutOpen(lphWaveOut: PHWaveOut; uDeviceID: Word;
  398.   lpFormat: PWaveFormat; dwCallback, dwInstance, dwFlags: Longint): Word;
  399. function waveOutClose(hWaveOut: PHWaveOut): Word;
  400. function waveOutPrepareHeader(hWaveOut: PHWaveOut; lpWaveOutHdr: PWaveHdr;
  401.   uSize: Word): Word;
  402. function waveOutUnprepareHeader(hWaveOut: PHWaveOut; lpWaveOutHdr: PWaveHdr;
  403.   uSize: Word): Word;
  404. function waveOutWrite(hWaveOut: PHWaveOut; lpWaveOutHdr: PWaveHdr;
  405.   uSize: Word): Word;
  406. function waveOutPause(hWaveOut: PHWaveOut): Word;
  407. function waveOutRestart(hWaveOut: PHWaveOut): Word;
  408. function waveOutReset(hWaveOut: PHWaveOut): Word;
  409. function waveOutBreakLoop(hWaveOut: PHWaveOut): Word;
  410. function waveOutGetPosition(hWaveOut: PHWaveOut; lpInfo: PMMTime;
  411.   uSize: Word): Word;
  412. function waveOutGetPitch(hWaveOut: PHWaveOut; lpdwPitch: PLongint): Word;
  413. function waveOutSetPitch(hWaveOut: PHWaveOut; dwPitch: Longint): Word;
  414.  
  415. function waveOutGetPlaybackRate(hWaveOut: PHWaveOut;
  416.   lpdwRate: PLongint): Word;
  417.  
  418. function waveOutSetPlaybackRate(hWaveOut: PHWaveOut; dwRate: Longint): Word;
  419.  
  420. function waveOutGetID(hWaveOut: PHWaveOut; lpuDeviceID: PWord): Word;
  421. function waveOutMessage(hWaveOut: PHWaveOut; uMessage: Word;
  422.   dw1, dw2: Longint): Longint;
  423.  
  424. function waveInGetNumDevs: Word;
  425.  
  426. function waveInGetDevCaps(uDeviceID: Word; lpCaps: PWaveInCaps;
  427.     uSize: Word): Word;
  428. function waveInGetErrorText(uError: Word; lpText: PChar; uSize: Word): Word;
  429.  
  430.  
  431. function waveInOpen(lphWaveIn: PHWaveIn; uDeviceID: Word;
  432.   lpFormat: PWaveFormat; dwCallback, dwInstance, dwFlags: Longint): Word;
  433.  
  434. function waveInClose(hWaveIn: PHWaveIn): Word;
  435.  
  436. function waveInPrepareHeader(hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr;
  437.   uSize: Word): Word;
  438.  
  439. function waveInUnprepareHeader(hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr;
  440.   uSize: Word): Word;
  441.  
  442. function waveInAddBuffer(hWaveIn: PHWaveIn; lpWaveInHdr: PWaveHdr;
  443.   uSize: Word): Word;
  444.  
  445. function waveInStart(hWaveIn: PHWaveIn): Word;
  446.  
  447. function waveInStop(hWaveIn: PHWaveIn): Word;
  448.  
  449. function waveInReset(hWaveIn: PHWaveIn): Word;
  450.  
  451. function waveInGetPosition(hWaveIn: PHWaveIn; lpInfo: PMMTime;
  452.   uSize: Word): Word;
  453.  
  454. function waveInGetID(hWaveIn: PHWaveIn; lpuDeviceID: PWord): Word;
  455.  
  456. function waveInMessage(hWaveIn: PHWaveIn; uMessage: Word;
  457.   dw1, dw2: Longint): Longint;
  458.  
  459.  
  460. {***************************************************************************
  461.  
  462.                             MIDI audio support
  463.  
  464. ***************************************************************************}
  465.  
  466. { MIDI error return values }
  467. const
  468.   midierr_Unprepared    = midierr_Base + 0;   { header not prepared }
  469.   midierr_StillPlaying  = midierr_Base + 1;   { still something playing }
  470.   midierr_NoMap         = midierr_Base + 2;   { no current map }
  471.   midierr_NotReady      = midierr_Base + 3;   { hardware is still busy }
  472.   midierr_NoDevice      = midierr_Base + 4;   { port no longer connected }
  473.   midierr_InvalidSetup  = midierr_Base + 5;   { invalid setup }
  474.   midierr_LastError     = midierr_Base + 5;   { last error in range }
  475.  
  476. { MIDI audio data types }
  477. type
  478.   PHMidi = ^HMidi;
  479.   HMidi = Word;
  480.  
  481.   PHMidiIn = ^HMidiIn;
  482.   HMidiIn = Word;
  483.  
  484.   PHMidiOut = ^HMidiOut;
  485.   HMidiOut = Word;
  486.  
  487. type
  488.   TMidiCallBack = TDrvCallBack;
  489.  
  490. const
  491.   MidiPatchSize   = 128;
  492.  
  493. type
  494.   PPatchArray = ^TPatchArray;
  495.   TPatchArray = array[0..MidiPatchSize-1] of Word;
  496.  
  497.   PKeyArray = ^TKeyArray;
  498.   TKeyArray = array[0..MidiPatchSize-1] of Word;
  499.  
  500.  
  501. { MIDI callback messages }
  502. const
  503.   mim_Open        = mm_MIM_Open;
  504.   mim_Close       = mm_MIM_Close;
  505.   mim_Data        = mm_MIM_Data;
  506.   mim_LongData    = mm_MIM_LongData;
  507.   mim_Error       = mm_MIM_Error;
  508.   mim_LongError   = mm_MIM_LongError;
  509.   mom_Open        = mm_MOM_Open;
  510.   mom_Close       = mm_MOM_Close;
  511.   mom_Done        = mm_MOM_Done;
  512.  
  513. { device ID for MIDI mapper }
  514. const
  515.   MidiMapper     = -1;
  516.   midi_Mapper    = -1;
  517.  
  518. { flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() }
  519. const
  520.   midi_Cache_All      = 1;
  521.   midi_Cache_BestFit  = 2;
  522.   midi_Cache_Query    = 3;
  523.   midi_Uncache        = 4;
  524.  
  525. { MIDI output device capabilities structure }
  526. type
  527.   PMidiOutCaps = ^TMidiOutCaps;
  528.   TMidiOutCaps = record
  529.     wMid: Word;                  { manufacturer ID }
  530.     wPid: Word;                  { product ID }
  531.     vDriverVersion: Version;        { version of the driver }
  532.     szPname: array[0..MaxPNameLen-1] of Char;  { product name (NULL terminated string) }
  533.     wTechnology: Word;           { type of device }
  534.     wVoices: Word;               { # of voices (internal synth only) }
  535.     wNotes: Word;                { max # of notes (internal synth only) }
  536.     wChannelMask: Word;          { channels used (internal synth only) }
  537.     dwSupport: Longint;           { functionality supported by driver }
  538.   end;
  539.  
  540.  
  541. { flags for wTechnology field of MIDIOUTCAPS structure }
  542. const
  543.   mod_MidiPort    = 1;  { output port }
  544.   mod_Synth       = 2;  { generic internal synth }
  545.   mod_SQSynth     = 3;  { square wave internal synth }
  546.   mod_FMSynth     = 4;  { FM internal synth }
  547.   mod_Mapper      = 5;  { MIDI mapper }
  548.  
  549. { flags for dwSupport field of MIDIOUTCAPS structure }
  550. const
  551.   midicaps_Volume          = $0001;  { supports volume control }
  552.   midicaps_LRVolume        = $0002;  { separate left-right volume control }
  553.   midicaps_Cache           = $0004;
  554.  
  555. { MIDI output device capabilities structure }
  556.  
  557. type
  558.   PMidiInCaps = ^TMidiInCaps;
  559.   TMidiInCaps = record
  560.     wMid: Word;                  { manufacturer ID }
  561.     wPid: Word;                  { product ID }
  562.     vDriverVersion: Version;        { version of the driver }
  563.     szPname: array[0..MaxPNameLen-1] of Char;  { product name (NULL terminated string) }
  564.   end;
  565.  
  566. { MIDI data block header }
  567. type
  568.   PMidiHdr = ^TMidiHdr;
  569.   TMidiHdr = record
  570.     lpData: PChar;                 { pointer to locked data block }
  571.     dwBufferLength: Longint;       { length of data in data block }
  572.     dwBytesRecorded: Longint;      { used for input only }
  573.     dwUser: Longint;               { for client's use }
  574.     dwFlags: Longint;              { assorted flags (see defines) }
  575.     lpNext: PMidiHdr;              { reserved for driver }
  576.     reserved: Longint;             { reserved for driver }
  577.   end;
  578.  
  579.  
  580. { flags for dwFlags field of MIDIHDR structure }
  581. const
  582.   mhdr_Done       = $00000001;       { done bit }
  583.   mhdr_Prepared   = $00000002;       { set if header prepared }
  584.   mhdr_InQueue    = $00000004;       { reserved for driver }
  585.  
  586. { MIDI function prototypes }
  587.  
  588. function midiOutGetNumDevs: Word;
  589. function midiOutGetDevCaps(uDeviceID: Word; lpCaps: PMidiOutCaps;
  590.   uSize: Word): Word;
  591. function midiOutGetVolume(uDeviceID: Word; lpdwVolume: PLongint): Word;
  592. function midiOutSetVolume(uDeviceID: Word; dwVolume: Longint): Word;
  593. function midiOutGetErrorText(uError: Word; lpText: PChar; uSize: Word): Word;
  594. function midiOutOpen(lphMidiOut: PHMidiOut; uDeviceID: Word;
  595.   dwCallback, dwInstance, dwFlags: Longint): Word;
  596. function midiOutClose(hMidiOut: PHMidiOut): Word;
  597. function midiOutPrepareHeader(hMidiOut: PHMidiOut; lpMidiOutHdr: PMidiHdr;
  598.   uSize: Word): Word;
  599. function midiOutUnprepareHeader(hMidiOut: PHMidiOut; lpMidiOutHdr: PMidiHdr;
  600.   uSize: Word): Word;
  601. function midiOutShortMsg(hMidiOut: PHMidiOut; dwMsg: Longint): Word;
  602. function midiOutLongMsg(hMidiOut: PHMidiOut; lpMidiOutHdr: PMidiHdr;
  603.   uSize: Word): Word;
  604. function midiOutReset(hMidiOut: PHMidiOut): Word;
  605. function midiOutCachePatches(hMidiOut: PHMidiOut;
  606.   uBank: Word; lpwPatchArray: PWord; uFlags: Word): Word;
  607. function midiOutCacheDrumPatches(hMidiOut: PHMidiOut;
  608.   uPatch: Word; lpwKeyArray: PWord; uFlags: Word): Word;
  609. function midiOutGetID(hMidiOut: PHMidiOut; lpuDeviceID: Word): Word;
  610. function midiOutMessage(hMidiOut: PHMidiOut; uMessage: Word;
  611.   dw1, dw2: Longint): Longint;
  612. function midiInGetNumDevs: Word;
  613. function midiInGetDevCaps(DeviceID: Word; lpCaps: PMidiInCaps;
  614.   uSize: Word): Word;
  615. function midiInGetErrorText(uError: Word; lpText: PChar; uSize: Word): Word;
  616. function midiInOpen(lphMidiIn: PHMidiIn; uDeviceID: Word;
  617.   dwCallback, dwInstance, dwFlags: Longint): Word;
  618. function midiInClose(hMidiIn: PHMidiIn): Word;
  619. function midiInPrepareHeader(hMidiIn: PHMidiIn; lpMidiInHdr: PMidiHdr;
  620.   uSize: Word): Word;
  621. function midiInUnprepareHeader(hMidiIn: PHMidiIn; lpMidiInHdr: PMidiHdr;
  622.   uSize: Word): Word;
  623. function midiInAddBuffer(hMidiIn: PHMidiIn; lpMidiInHdr: PMidiHdr;
  624.   uSize: Word): Word;
  625. function midiInStart(hMidiIn: PHMidiIn): Word;
  626. function midiInStop(hMidiIn: PHMidiIn): Word;
  627. function midiInReset(hMidiIn: PHMidiIn): Word;
  628. function midiInGetID(hMidiIn: PHMidiIn; lpuDeviceID: PWord): Word;
  629.  
  630. function midiInMessage(hMidiIn: PHMidiIn; uMessage: Word;
  631.   dw1, dw2: Longint): Longint;
  632.  
  633.  
  634. {***************************************************************************
  635.  
  636.                         Auxiliary audio support
  637.  
  638. ***************************************************************************}
  639.  
  640. { device ID for aux device mapper }
  641. const
  642.   aux_Mapper     = -1;
  643.  
  644. { Auxiliary audio device capabilities structure }
  645. type
  646.   PAuxCaps = ^TAuxCaps;
  647.   TAuxCaps = record
  648.     wMid: Word;                  { manufacturer ID }
  649.     wPid: Word;                  { product ID }
  650.     vDriverVersion: Version;        { version of the driver }
  651.     szPname: array[0..MaxPNameLen-1] of Char;  { product name (NULL terminated string) }
  652.     wTechnology: Word;           { type of device }
  653.     dwSupport: Longint;             { functionality supported by driver }
  654.   end;
  655.  
  656. { flags for wTechnology field in AUXCAPS structure }
  657. const
  658.   auxcaps_CDAudio    = 1;       { audio from internal CD-ROM drive }
  659.   auxcaps_AuxIn      = 2;       { audio from auxiliary input jacks }
  660.  
  661. { flags for dwSupport field in AUXCAPS structure }
  662. const
  663.   auxcaps_Volume     = $0001;  { supports volume control }
  664.   auxcaps_LRVolume   = $0002;  { separate left-right volume control }
  665.  
  666. { auxiliary audio function prototypes }
  667. function auxGetNumDevs: Word;
  668. function auxGetDevCaps(uDeviceID: Word; lpCaps: PAuxCaps; uSize: Word): Word;
  669. function auxSetVolume(uDeviceID: Word; dwVolume: Longint): Word;
  670. function auxGetVolume(uDeviceID: Word; lpdwVolume: PLongint): Word;
  671. function auxOutMessage(uDeviceID, uMessage: Word; dw1, dw2: Longint): Longint;
  672.  
  673.  
  674. {***************************************************************************
  675.  
  676.                             Timer support
  677.  
  678. ***************************************************************************}
  679.  
  680. { timer error return values }
  681. const
  682.   timerr_NoError        = 0;                  { no error }
  683.   timerr_NoCanDo        = timerr_Base+1;      { request not completed }
  684.   timerr_Struct         = timerr_Base+33;     { time struct size }
  685.  
  686. { timer data types }
  687. type
  688.   TTimeCallBack = procedure(uTimerID, uMessage: Word; dwUser, dw1, dw2: Longint);
  689.  
  690.  
  691. { flags for wFlags parameter of timeSetEvent() function }
  692. const
  693.   time_OneShot    = 0;   { program timer for single event }
  694.   time_Periodic   = 1;   { program for continuous periodic event }
  695.  
  696. { timer device capabilities data structure }
  697. type
  698.   PTimeCaps = ^TTimeCaps;
  699.   TTimeCaps = record
  700.     wPeriodMin: Word;     { minimum period supported  }
  701.     wPeriodMax: Word;     { maximum period supported  }
  702.   end;
  703.  
  704.  
  705. { timer function prototypes }
  706. function timeGetSystemTime(lpTime: PMMTime; uSize: Word): Word;
  707.  
  708. function timeGetTime: Longint;
  709. function timeSetEvent(uDelay, uResolution: Word;
  710.   lpFunction: TTimeCallBack; dwUser: Longint; uFlags: Word): Word;
  711. function timeKillEvent(uTimerID: Word): Word;
  712. function timeGetDevCaps(lpTimeCaps: PTimeCaps; uSize: Word): Word;
  713. function timeBeginPeriod(uPeriod: Word): Word;
  714.  
  715. function timeEndPeriod(uPeriod: Word): Word;
  716.  
  717.  
  718. {***************************************************************************
  719.  
  720.                             Joystick support
  721.  
  722. ***************************************************************************}
  723.  
  724. { joystick error return values }
  725. const
  726.   joyerr_NoError        = 0;                  { no error }
  727.   joyerr_Parms          = joyerr_Base+5;      { bad parameters }
  728.   joyerr_NoCanDo        = joyerr_Base+6;      { request not completed }
  729.   joyerr_Unplugged      = joyerr_Base+7;      { joystick is unplugged }
  730.  
  731. { constants used with JOYINFO structure and MM_JOY* messages }
  732. const
  733.   joy_Button1         = $0001;
  734.   joy_Button2         = $0002;
  735.   joy_Button3         = $0004;
  736.   joy_Button4         = $0008;
  737.   joy_Button1Chg      = $0100;
  738.   joy_Button2Chg      = $0200;
  739.   joy_Button3Chg      = $0400;
  740.   joy_Button4Chg      = $0800;
  741.  
  742. { joystick ID constants }
  743. const
  744.   joystickID1         = 0;
  745.   joystickID2         = 1;
  746.  
  747. { joystick device capabilities data structure }
  748. type
  749.   PJoyCaps = ^TJoyCaps;
  750.   TJoyCaps = record
  751.     wMid: Word;                  { manufacturer ID }
  752.     wPid: Word;                  { product ID }
  753.     szPname: array[0..MaxPNameLen-1] of Char;  { product name (NULL terminated string) }
  754.     wXmin: Word;                 { minimum x position value }
  755.     wXmax: Word;                 { maximum x position value }
  756.     wYmin: Word;                 { minimum y position value }
  757.     wYmax: Word;                 { maximum y position value }
  758.     wZmin: Word;                 { minimum z position value }
  759.     wZmax: Word;                 { maximum z position value }
  760.     wNumButtons: Word;           { number of buttons }
  761.     wPeriodMin: Word;            { minimum message period when captured }
  762.     wPeriodMax: Word;            { maximum message period when captured }
  763.   end;
  764.  
  765. { joystick information data structure }
  766. type
  767.   PJoyInfo = ^TJoyInfo;
  768.   TJoyInfo = record
  769.      wXpos: Word;                 { x position }
  770.      wYpos: Word;                 { y position }
  771.      wZpos: Word;                 { z position }
  772.      wButtons: Word;              { button states }
  773.   end;
  774.  
  775. { joystick function prototypes }
  776. function joyGetDevCaps(uJoyID: Word; lpCaps: PJoyCaps; uSize: Word): Word;
  777. function joyGetNumDevs: Word;
  778.  
  779. function joyGetPos(uJoyID: Word; lpInfo: PJoyInfo): Word;
  780.  
  781. function joyGetThreshold(uJoyID: Word; lpuThreshold: PWord): Word;
  782.  
  783. function joyReleaseCapture(uJoyID: Word): Word;
  784.  
  785. { Changed first parameter name from "hwnd" to "Handle" }
  786. function joySetCapture(Handle: HWnd; uJoyID, uPeriod: Word;
  787.   bChanged: Bool): Word;
  788.  
  789. function joySetThreshold(uJoyID, uThreshold: Word): Word;
  790.  
  791. {***************************************************************************
  792.  
  793.                         Multimedia File I/O support
  794.  
  795. ***************************************************************************}
  796.  
  797. { MMIO error return values }
  798. const
  799.   mmioerr_Base            = 256;
  800.   mmioerr_FileNotFound    = mmioerr_Base + 1;  { file not found }
  801.   mmioerr_OutOfMemory     = mmioerr_Base + 2;  { out of memory }
  802.   mmioerr_CannotOpen      = mmioerr_Base + 3;  { cannot open }
  803.   mmioerr_CannotClose     = mmioerr_Base + 4;  { cannot close }
  804.   mmioerr_CannotRead      = mmioerr_Base + 5;  { cannot read }
  805.   mmioerr_CannotWrite     = mmioerr_Base + 6;  { cannot write }
  806.   mmioerr_CannotSeek      = mmioerr_Base + 7;  { cannot seek }
  807.   mmioerr_CannotExpand    = mmioerr_Base + 8;  { cannot expand file }
  808.   mmioerr_ChunkNotFound   = mmioerr_Base + 9;  { chunk not found }
  809.   mmioerr_Unbuffered      = mmioerr_Base + 10; { file is unbuffered }
  810.  
  811. { MMIO constants }
  812. const
  813.   CFSepChar       = '+';             { compound file name separator char. }
  814.  
  815. { MMIO data types }
  816. type
  817.   FourCC = Longint;                     { a four character code }
  818.  
  819. type
  820.   PHMMIO = ^THMMIO;
  821.   THMMIO = Word;      { a handle to an open file }
  822.  
  823. type
  824.   TMMIOProc = function(lpmmioinfo: PChar; uMessage: Word;
  825.                 lParam1, lParam2: Longint): Longint;
  826.  
  827. { general MMIO information data structure }
  828. type
  829.   PMMIOInfo = ^TMMIOInfo;
  830.   TMMIOInfo = record
  831.     { general fields }
  832.     dwFlags: Longint;        { general status flags }
  833.     fccIOProc: FourCC;      { pointer to I/O procedure }
  834.     pIOProc: TMMIOProc;        { pointer to I/O procedure }
  835.     wErrorRet: Word;      { place for error to be returned }
  836.     hTask: TTask;          { alternate local task }
  837.  
  838.     { fields maintained by MMIO functions during buffered I/O }
  839.     cchBuffer: Longint;      { size of I/O buffer (or 0L) }
  840.     pchBuffer: PChar;      { start of I/O buffer (or NULL) }
  841.     pchNext: PChar;        { pointer to next byte to read/write }
  842.     pchEndRead: PChar;     { pointer to last valid byte to read }
  843.     pchEndWrite: PChar;    { pointer to last byte to write }
  844.     lBufOffset: Longint;     { disk offset of start of buffer }
  845.  
  846.     { fields maintained by I/O procedure }
  847.     lDiskOffset: Longint;    { disk offset of next read or write }
  848.     adwInfo: array[0..2] of Longint;     { data specific to type of MMIOPROC }
  849.  
  850.     { other fields maintained by MMIO }
  851.     dwReserved1: Longint;    { reserved for MMIO use }
  852.     dwReserved2: Longint;    { reserved for MMIO use }
  853.     hmmio: THMMIO;          { handle to open file }
  854.   end;
  855.  
  856.  
  857. { RIFF chunk information data structure }
  858. type
  859.  
  860.   PMMCKInfo = ^TMMCKInfo;
  861.   TMMCKInfo = record
  862.     ckid: FourCC;           { chunk ID }
  863.     cksize: Longint;         { chunk size }
  864.     fccType: FourCC;        { form type or list type }
  865.     dwDataOffset: Longint;   { offset of data portion of chunk }
  866.     dwFlags: Longint;        { flags used by MMIO functions }
  867.   end;
  868.  
  869. { bit field masks }
  870. const
  871.   mmio_RWMode     = $00000003;      { open file for reading/writing/both }
  872.   mmio_ShareMode  = $00000070;      { file sharing mode number }
  873.  
  874. { constants for dwFlags field of MMIOINFO }
  875. const
  876.   mmio_Create    = $00001000;     { create new file (or truncate file) }
  877.   mmio_Parse     = $00000100;     { parse new file returning path }
  878.   mmio_Delete    = $00000200;     { create new file (or truncate file) }
  879.   mmio_Exist     = $00004000;     { checks for existence of file }
  880.   mmio_AllocBuf  = $00010000;     { mmioOpen() should allocate a buffer }
  881.   mmio_GetTemp   = $00020000;     { mmioOpen() should retrieve temp name }
  882.  
  883. const
  884.   mmio_Dirty     = $10000000;     { I/O buffer is dirty }
  885.  
  886.  
  887. { read/write mode numbers (bit field MMIO_RWMODE) }
  888. const
  889.   mmio_Read       = $00000000;      { open file for reading only }
  890.   mmio_Write      = $00000001;      { open file for writing only }
  891.   mmio_ReadWrite  = $00000002;      { open file for reading and writing }
  892.  
  893. { share mode numbers (bit field MMIO_SHAREMODE) }
  894. const
  895.   mmio_Compat     = $00000000;      { compatibility mode }
  896.   mmio_Exclusive  = $00000010;      { exclusive-access mode }
  897.   mmio_DenyWrite  = $00000020;      { deny writing to other processes }
  898.   mmio_DenyRead   = $00000030;      { deny reading to other processes }
  899.   mmio_DenyNone   = $00000040;      { deny nothing to other processes }
  900.  
  901. { various MMIO flags }
  902. const
  903.   mmio_FHOpen             = $0010;  { mmioClose: keep file handle open }
  904.   mmio_EmptyBuf           = $0010;  { mmioFlush: empty the I/O buffer }
  905.   mmio_ToUpper            = $0010;  { mmioStringToFOURCC: to u-case }
  906.   mmio_InstallProc    = $00010000;  { mmioInstallIOProc: install MMIOProc }
  907.   mmio_GlobalProc     = $10000000;  { mmioInstallIOProc: install globally }
  908.   mmio_RemoveProc     = $00020000;  { mmioInstallIOProc: remove MMIOProc }
  909.   mmio_FindProc       = $00040000;  { mmioInstallIOProc: find an MMIOProc }
  910.   MMIO_FindChunk          = $0010;  { mmioDescend: find a chunk by ID }
  911.   mmio_FindRIFF           = $0020;  { mmioDescend: find a LIST chunk }
  912.   mmio_FindList           = $0040;  { mmioDescend: find a RIFF chunk }
  913.   mmio_CreateRIFF         = $0020;  { mmioCreateChunk: make a LIST chunk }
  914.   mmio_CreateList         = $0040;  { mmioCreateChunk: make a RIFF chunk }
  915.  
  916.  
  917. { message numbers for MMIOPROC I/O procedure functions }
  918. const
  919.   mmiom_Read      = mmio_Read;       { read }
  920.   mmiom_Write    = mmio_Write;       { write }
  921.   mmiom_Seek              = 2;       { seek to a new position in file }
  922.   mmiom_Open              = 3;       { open file }
  923.   mmiom_Close             = 4;       { close file }
  924.   mmiom_WriteFlush        = 5;       { write and flush }
  925.  
  926. const
  927.   mmiom_Rename            = 6;       { rename specified file }
  928.  
  929. const
  930.   mmiom_User         = $8000;       { beginning of user-defined messages }
  931.  
  932. { standard four character codes }
  933. const
  934.   FourCC_RIFF = $46464952;   { 'RIFF' }
  935.   FourCC_List = $5453494C;   { 'LIST' }
  936.  
  937. { four character codes used to identify standard built-in I/O procedures }
  938. const
  939.   FourCC_DOS  = $20532F44;   { 'DOS '}
  940.   FourCC_MEM  = $204D454D;   { 'MEM '}
  941.  
  942. { flags for mmioSeek() }
  943. const
  944.   seek_Set        = 0;               { seek to an absolute position }
  945.   seek_Cur        = 1;               { seek relative to current position }
  946.   seek_End        = 2;               { seek relative to end of file }
  947.  
  948. { other constants }
  949. const
  950.   mmio_DefaultBuffer      = 8192;    { default buffer size }
  951.  
  952. { MMIO function prototypes }
  953. function mmioStringToFOURCC(sz: PChar; uFlags: Word): FourCC;
  954.  
  955. { should return a TMMIOProc }
  956. function mmioInstallIOProc(fccIOProc: FourCC; pIOProc: TMMIOProc;
  957.   dwFlags: Longint): Pointer;
  958.  
  959. function mmioOpen(szFileName: PChar; lpmmioinfo: PMMIOInfo;
  960.   dwOpenFlags: Longint): THMMIO;
  961. function mmioRename(szFileName: PChar; szNewFileName: PChar;
  962.   lpmmioinfo: PMMIOInfo; dwRenameFlags: Longint): Word;
  963. function mmioClose(hmmio: THMMIO; uFlags: Word): Word;
  964. function mmioRead(hmmio: THMMIO; pch: PChar; cch: Longint): Longint;
  965.  
  966. function mmioWrite(hmmio: THMMIO; pch: PChar; cch: Longint): Longint;
  967. function mmioSeek(hmmio: THMMIO; lOffset: Longint; iOrigin: Integer): Longint;
  968. function mmioGetInfo(hmmio: THMMIO; lpmmioinfo: PMMIOInfo; uFlags: Word): Word;
  969. function mmioSetInfo(hmmio: THMMIO; lpmmioinfo: PMMIOInfo; uFlags: Word): Word;
  970. function mmioSetBuffer(hmmio: THMMIO; pchBuffer: PChar; cchBuffer: Longint;
  971.   uFlags: Word): Word;
  972. function mmioFlush(hmmio: THMMIO; uFlags: Word): Word;
  973. function mmioAdvance(hmmio: THMMIO; lpmmioinfo: PMMIOInfo; uFlags: Word): Word;
  974. function mmioSendMessage(hmmio: THMMIO; uMessage: Word;
  975.   lParam1, lParam2: Longint): Longint;
  976. function mmioDescend(hmmio: THMMIO; lpck: PMMCKInfo;
  977.   lpckParent: PMMCKInfo; uFlags: Word): Word;
  978. function mmioAscend(hmmio: THMMIO; lpck: PMMCKInfo; uFlags: Word): Word;
  979. function mmioCreateChunk(hmmio: THMMIO; lpck: PMMCKInfo; uFlags: Word): Word;
  980.  
  981.  
  982. {***************************************************************************
  983.  
  984.                             MCI support
  985.  
  986. ***************************************************************************}
  987.  
  988. type
  989.   TYieldProc = function(uDeviceID: Word; dwYieldData: Longint): Word;
  990.  
  991. { MCI function prototypes }
  992. function mciSendCommand(uDeviceID, uMessage: Word;
  993.   dwParam1, dwParam2: Longint): Longint;
  994.  
  995. function mciSendString(lpstrCommand: PChar; lpstrReturnString: PChar;
  996.   uReturnLength: Word; hWndCallback: HWnd): Longint;
  997.  
  998. function mciGetDeviceID(lpstrName: PChar): Word;
  999.  
  1000. function mciGetDeviceIDFromElementID(dwElementID: Longint;
  1001.   lpstrType: PChar): Word;
  1002.  
  1003. function mciGetErrorString(wError: Longint; lpstrBuffer: PChar;
  1004.   uLength: Word): Bool;
  1005.  
  1006. function mciSetYieldProc(uDeviceID: Word; fpYieldProc: TYieldProc;
  1007.   dwYieldData: Longint): Bool;
  1008.  
  1009. function mciGetCreatorTask(uDeviceID: Word): TTask;
  1010.  
  1011. (* Returns a TYieldProc *)
  1012. function mciGetYieldProc(uDeviceID: Word; lpdwYieldData: PLongint): Pointer;
  1013.  
  1014.  
  1015. { MCI error return values }
  1016. const
  1017.   mcierr_Invalid_Device_ID        = mcierr_Base + 1;
  1018.   mcierr_Unrecognized_Keyword     = mcierr_Base + 3;
  1019.   mcierr_Unrecognized_Command     = mcierr_Base + 5;
  1020.   mcierr_Hardware                 = mcierr_Base + 6;
  1021.   mcierr_Invalid_Device_Name      = mcierr_Base + 7;
  1022.   mcierr_Out_Of_Memory            = mcierr_Base + 8;
  1023.   mcierr_Device_Open              = mcierr_Base + 9;
  1024.   mcierr_Cannot_Load_Driver       = mcierr_Base + 10;
  1025.   mcierr_Missing_Command_String   = mcierr_Base + 11;
  1026.   mcierr_Param_Overflow           = mcierr_Base + 12;
  1027.   mcierr_Missing_String_Argument  = mcierr_Base + 13;
  1028.   mcierr_Bad_Integer              = mcierr_Base + 14;
  1029.   mcierr_Parser_Internal          = mcierr_Base + 15;
  1030.   mcierr_Driver_Internal          = mcierr_Base + 16;
  1031.   mcierr_Missing_Parameter        = mcierr_Base + 17;
  1032.   mcierr_Unsupported_Function     = mcierr_Base + 18;
  1033.   mcierr_File_Not_Found           = mcierr_Base + 19;
  1034.   mcierr_Device_Not_Ready         = mcierr_Base + 20;
  1035.   mcierr_Internal                 = mcierr_Base + 21;
  1036.   mcierr_Driver                   = mcierr_Base + 22;
  1037.   mcierr_Cannot_Use_All           = mcierr_Base + 23;
  1038.   mcierr_Multiple                 = mcierr_Base + 24;
  1039.   mcierr_Extension_Not_Found      = mcierr_Base + 25;
  1040.   mcierr_OutOfRange               = mcierr_Base + 26;
  1041.   mcierr_Flags_Not_Compatible     = mcierr_Base + 28;
  1042.   mcierr_File_Not_Saved           = mcierr_Base + 30;
  1043.   mcierr_Device_Type_Required     = mcierr_Base + 31;
  1044.   mcierr_Device_Locked            = mcierr_Base + 32;
  1045.   mcierr_Duplicate_Alias          = mcierr_Base + 33;
  1046.   mcierr_Bad_Constant             = mcierr_Base + 34;
  1047.   mcierr_Must_Use_Shareable       = mcierr_Base + 35;
  1048.   mcierr_Missing_Device_Name      = mcierr_Base + 36;
  1049.   mcierr_Bad_Time_Format          = mcierr_Base + 37;
  1050.   mcierr_No_Closing_Quote         = mcierr_Base + 38;
  1051.   mcierr_Duplicate_Flags          = mcierr_Base + 39;
  1052.   mcierr_Invalid_File             = mcierr_Base + 40;
  1053.   mcierr_Null_Parameter_Block     = mcierr_Base + 41;
  1054.   mcierr_Unnamed_Resource         = mcierr_Base + 42;
  1055.   mcierr_New_Requires_Alias       = mcierr_Base + 43;
  1056.   mcierr_Notify_On_Auto_Open      = mcierr_Base + 44;
  1057.   mcierr_No_Element_Allowed       = mcierr_Base + 45;
  1058.   mcierr_NONAPPLICABLE_Function   = mcierr_Base + 46;
  1059.   mcierr_Illegal_For_Auto_Open    = mcierr_Base + 47;
  1060.   mcierr_Filename_Required        = mcierr_Base + 48;
  1061.   mcierr_Extra_Characters         = mcierr_Base + 49;
  1062.   mcierr_Device_Not_Installed     = mcierr_Base + 50;
  1063.   mcierr_Get_CD                   = mcierr_Base + 51;
  1064.   mcierr_Set_CD                   = mcierr_Base + 52;
  1065.   mcierr_Set_Drive                = mcierr_Base + 53;
  1066.   mcierr_Device_Length            = mcierr_Base + 54;
  1067.   mcierr_Device_ORD_Length        = mcierr_Base + 55;
  1068.   mcierr_No_Integer               = mcierr_Base + 56;
  1069.  
  1070. const
  1071.   mcierr_Wave_OutputsInUse        = mcierr_Base + 64;
  1072.   mcierr_Wave_SetOutputInUse      = mcierr_Base + 65;
  1073.   mcierr_Wave_InputsInUse         = mcierr_Base + 66;
  1074.   mcierr_Wave_SetInputInUse       = mcierr_Base + 67;
  1075.   mcierr_Wave_OutputUnspecified   = mcierr_Base + 68;
  1076.   mcierr_Wave_InputUnspecified    = mcierr_Base + 69;
  1077.   mcierr_Wave_OutputsUnsuitable   = mcierr_Base + 70;
  1078.   mcierr_Wave_SetOutputUnsuitable = mcierr_Base + 71;
  1079.   mcierr_Wave_InputsUnsuitable    = mcierr_Base + 72;
  1080.   mcierr_Wave_SetInputUnsuitable  = mcierr_Base + 73;
  1081.  
  1082.   mcierr_Seq_Div_Incompatible     = mcierr_Base + 80;
  1083.   mcierr_Seq_Port_InUse           = mcierr_Base + 81;
  1084.   mcierr_Seq_Port_Nonexistent     = mcierr_Base + 82;
  1085.   mcierr_Seq_Port_MapNoDevice     = mcierr_Base + 83;
  1086.   mcierr_Seq_Port_MiscError       = mcierr_Base + 84;
  1087.   mcierr_Seq_Timer                = mcierr_Base + 85;
  1088.   mcierr_Seq_PortUnspecified      = mcierr_Base + 86;
  1089.   mcierr_Seq_NoMIDIPresent        = mcierr_Base + 87;
  1090.  
  1091.   mcierr_No_Window                = mcierr_Base + 90;
  1092.   mcierr_CreateWindow             = mcierr_Base + 91;
  1093.   mcierr_File_Read                = mcierr_Base + 92;
  1094.   mcierr_File_Write               = mcierr_Base + 93;
  1095.  
  1096. { all custom device driver errors must be >= than this value }
  1097. const
  1098.   mcierr_Custom_Driver_Base       = mcierr_Base + 256;
  1099.  
  1100. { MCI command message identifiers }
  1101. const
  1102.   mci_Open       = $0803;
  1103.   mci_Close      = $0804;
  1104.   mci_Escape     = $0805;
  1105.   mci_Play       = $0806;
  1106.   mci_Seek       = $0807;
  1107.   mci_Stop       = $0808;
  1108.   mci_Pause      = $0809;
  1109.   mci_Info       = $080A;
  1110.   mci_GetDevCaps = $080B;
  1111.   mci_Spin       = $080C;
  1112.   mci_Set        = $080D;
  1113.   mci_Step       = $080E;
  1114.   mci_Record     = $080F;
  1115.   mci_SysInfo    = $0810;
  1116.   mci_Break      = $0811;
  1117.   mci_Sound      = $0812;
  1118.   mci_Save       = $0813;
  1119.   mci_Status     = $0814;
  1120.   mci_Cue        = $0830;
  1121.   mci_Realize    = $0840;
  1122.   mci_Window     = $0841;
  1123.   mci_Put        = $0842;
  1124.   mci_Where      = $0843;
  1125.   mci_Freeze     = $0844;
  1126.   mci_Unfreeze   = $0845;
  1127.   mci_Load       = $0850;
  1128.   mci_Cut        = $0851;
  1129.   mci_Copy       = $0852;
  1130.   mci_Paste      = $0853;
  1131.   mci_Update     = $0854;
  1132.   mci_Resume     = $0855;
  1133.   mci_Delete     = $0856;
  1134.  
  1135. { all custom MCI command messages must be >= than this value }
  1136. const
  1137.   mci_User_Messages               = $400 + drv_MCI_First;
  1138.  
  1139. { device ID for "all devices" }
  1140. const
  1141.   mci_All_Device_ID               = $FFFF;
  1142.  
  1143. { constants for predefined MCI device types }
  1144. const
  1145.   mci_DevType_VCR                 = mci_String_Offset + 1;
  1146.   mci_DevType_Videodisc           = mci_String_Offset + 2;
  1147.   mci_DevType_Overlay             = mci_String_Offset + 3;
  1148.   mci_DevType_CD_Audio            = mci_String_Offset + 4;
  1149.   mci_DevType_DAT                 = mci_String_Offset + 5;
  1150.   mci_DevType_Scanner             = mci_String_Offset + 6;
  1151.   mci_DevType_Animation           = mci_String_Offset + 7;
  1152.   mci_DevType_Digital_Video       = mci_String_Offset + 8;
  1153.   mci_DevType_Other               = mci_String_Offset + 9;
  1154.   mci_DevType_Waveform_Audio      = mci_String_Offset + 10;
  1155.   mci_DevType_Sequencer           = mci_String_Offset + 11;
  1156.  
  1157.   mci_DevType_First              = mci_DevType_VCR;
  1158.   mci_DevType_Last               = mci_DevType_Sequencer;
  1159.  
  1160. { return values for 'status mode' command }
  1161. const
  1162.   mci_Mode_Not_Ready              = mci_String_Offset + 12;
  1163.   mci_Mode_Stop                   = mci_String_Offset + 13;
  1164.   mci_Mode_Play                   = mci_String_Offset + 14;
  1165.   mci_Mode_Record                 = mci_String_Offset + 15;
  1166.   mci_Mode_Seek                   = mci_String_Offset + 16;
  1167.   mci_Mode_Pause                  = mci_String_Offset + 17;
  1168.   mci_Mode_Open                   = mci_String_Offset + 18;
  1169.  
  1170. { constants used in 'set time format' and 'status time format' commands }
  1171. const
  1172.   mci_Format_Milliseconds         = 0;
  1173.   mci_Format_HMS                  = 1;
  1174.   mci_Format_MSF                  = 2;
  1175.   mci_Format_Frames               = 3;
  1176.   mci_Format_SMPTE_24             = 4;
  1177.   mci_Format_SMPTE_25             = 5;
  1178.   mci_Format_SMPTE_30             = 6;
  1179.   mci_Format_SMPTE_30Drop         = 7;
  1180.   mci_Format_Bytes                = 8;
  1181.   mci_Format_Samples              = 9;
  1182.   mci_Format_TMSF                 = 10;
  1183.  
  1184. { MCI time format conversion macros }
  1185.  
  1186. function mci_MSF_Minute(msf: Longint): Byte;
  1187. inline(
  1188.   $58/      { POP AX }
  1189.   $5A);     { POP DX }
  1190.  
  1191. function mci_MSF_Second(msf: Longint): Byte;
  1192. inline(
  1193.   $58/      { POP AX }
  1194.   $5A/      { POP DX }
  1195.   $86/$C4); { XCHG AH,AL }
  1196.  
  1197. function mci_MSF_Frame(msf: Longint): Byte;
  1198. inline(
  1199.   $5A/       { POP DX - reverse order to get hi word in AX }
  1200.   $58);      { POP AX }
  1201.  
  1202. function mci_Make_MSF(m, s, f: Byte): Longint;
  1203. inline(
  1204.   $5A/      { POP DX    (f) }
  1205.   $32/$F6/  { XOR DH,DH     }
  1206.   $5B/      { POP BX    (s) }
  1207.   $58/      { POP AX    (m) }
  1208.   $8A/$E3); { MOV AH,BL     }
  1209.  
  1210. function mci_TMSF_Track(tmsf: Longint): Byte;
  1211. inline(
  1212.   $58/      { POP AX }
  1213.   $5A);     { POP DX }
  1214.  
  1215. function mci_TMSF_Minute(msf: Longint): Byte;
  1216. inline(
  1217.   $58/      { POP AX }
  1218.   $5A/      { POP DX }
  1219.   $86/$C4); { XCHG AH,AL }
  1220.  
  1221. function mci_TMSF_Second(msf: Longint): Byte;
  1222. inline(
  1223.   $5A/       { POP DX - reverse order to get hi word in AX }
  1224.   $58);      { POP AX }
  1225.  
  1226. function mci_TMSF_Frame(msf: Longint): Byte;
  1227. inline(
  1228.   $5A/       { POP DX - reverse order to get hi word in AX }
  1229.   $58/       { POP AX }
  1230.   $86/$C4);  { XCHG AH,AL }
  1231.  
  1232. function mci_Make_TMSF(t, m, s, f: Byte): Longint;
  1233. inline(
  1234.   $5A/      { POP  DX }
  1235.   $86/$D6/  { XCHG DH,DL }
  1236.   $5B/      { POP  BX }
  1237.   $8A/$D3/  { MOV  DL, BL }
  1238.   $58/      { POP  AX }
  1239.   $86/$C4/  { XCHG AH,AL }
  1240.   $5B/      { POP  BX }
  1241.   $8A/$C3); { MOV  AL,BL }
  1242.  
  1243.  
  1244. function mci_HMS_Hour(hms: Longint): Byte;
  1245. inline(
  1246.   $58/      { POP AX }
  1247.   $5A);     { POP DX }
  1248.  
  1249. function mci_HMS_Minute(hms: Longint): Byte;
  1250. inline(
  1251.   $58/      { POP AX }
  1252.   $5A/      { POP DX }
  1253.   $86/$C4); { XCHG AH,AL }
  1254.  
  1255. function mci_HMS_Second(hms: Longint): Byte;
  1256. inline(
  1257.   $5A/       { POP DX - reverse order to get hi word in AX }
  1258.   $58);      { POP AX }
  1259.  
  1260. function mci_Make_HMS(h, m, s: Byte): Longint;
  1261. inline(
  1262.   $5A/      { POP DX    (s) }
  1263.   $32/$F6/  { XOR DH,DH     }
  1264.   $5B/      { POP BX    (m) }
  1265.   $58/      { POP AX    (h) }
  1266.   $8A/$E3); { MOV AH,BL     }
  1267.  
  1268.  
  1269.  
  1270. { flags for wParam of MM_MCINOTIFY message }
  1271. const
  1272.   mci_Notify_Successful           = $0001;
  1273.   mci_Notify_Superseded           = $0002;
  1274.   mci_Notify_Aborted              = $0004;
  1275.   mci_Notify_Failure              = $0008;
  1276.  
  1277.  
  1278. { common flags for dwFlags parameter of MCI command messages }
  1279. const
  1280.   mci_Notify                      = $00000001;
  1281.   mci_Wait                        = $00000002;
  1282.   mci_From                        = $00000004;
  1283.   mci_To                          = $00000008;
  1284.   mci_Track                       = $00000010;
  1285.  
  1286. { flags for dwFlags parameter of MCI_OPEN command message }
  1287. const
  1288.   mci_Open_Shareable              = $00000100;
  1289.   mci_Open_Element                = $00000200;
  1290.   mci_Open_Alias                  = $00000400;
  1291.   mci_Open_Element_ID             = $00000800;
  1292.   mci_Open_Type_ID                = $00001000;
  1293.   mci_Open_Type                   = $00002000;
  1294.  
  1295. { flags for dwFlags parameter of MCI_SEEK command message }
  1296. const
  1297.   mci_Seek_To_Start               = $00000100;
  1298.   mci_Seek_To_End                 = $00000200;
  1299.  
  1300. { flags for dwFlags parameter of MCI_STATUS command message }
  1301. const
  1302.   mci_Status_Item                 = $00000100;
  1303.   mci_Status_Start                = $00000200;
  1304.  
  1305. { flags for dwItem field of the MCI_STATUS_PARMS parameter block }
  1306. const
  1307.   mci_Status_Length               = $00000001;
  1308.   mci_Status_Position             = $00000002;
  1309.   mci_Status_Number_Of_Tracks     = $00000003;
  1310.   mci_Status_Mode                 = $00000004;
  1311.   mci_Status_Media_Present        = $00000005;
  1312.   mci_Status_Time_Format          = $00000006;
  1313.   mci_Status_Ready                = $00000007;
  1314.   mci_Status_Current_Track        = $00000008;
  1315.  
  1316. { flags for dwFlags parameter of MCI_INFO command message }
  1317. const
  1318.   mci_Info_Product                = $00000100;
  1319.   mci_Info_File                   = $00000200;
  1320.  
  1321. { flags for dwFlags parameter of MCI_GETDEVCAPS command message }
  1322. const
  1323.   mci_GetDevCaps_Item             = $00000100;
  1324.  
  1325. { flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block }
  1326. const
  1327.   mci_GetDevCaps_Can_Record       = $00000001;
  1328.   mci_GetDevCaps_Has_Audio        = $00000002;
  1329.   mci_GetDevCaps_Has_Video        = $00000003;
  1330.   mci_GetDevCaps_Device_Type      = $00000004;
  1331.   mci_GetDevCaps_Uses_Files       = $00000005;
  1332.   mci_GetDevCaps_Compound_Device  = $00000006;
  1333.   mci_GetDevCaps_Can_Eject        = $00000007;
  1334.   mci_GetDevCaps_Can_Play         = $00000008;
  1335.   mci_GetDevCaps_Can_Save         = $00000009;
  1336.  
  1337. { flags for dwFlags parameter of MCI_SYSINFO command message }
  1338. const
  1339.   mci_SysInfo_Quantity            = $00000100;
  1340.   mci_SysInfo_Open                = $00000200;
  1341.   mci_SysInfo_Name                = $00000400;
  1342.   mci_SysInfo_InstallName         = $00000800;
  1343.  
  1344. { flags for dwFlags parameter of MCI_SET command message }
  1345. const
  1346.   mci_Set_Door_Open               = $00000100;
  1347.   mci_Set_Door_Closed             = $00000200;
  1348.   mci_Set_Time_Format             = $00000400;
  1349.   mci_Set_Audio                   = $00000800;
  1350.   mci_Set_Video                   = $00001000;
  1351.   mci_Set_On                      = $00002000;
  1352.   mci_Set_Off                     = $00004000;
  1353.  
  1354. { flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS }
  1355. const
  1356.   mci_Set_Audio_All               = $00000000;
  1357.   mci_Set_Audio_Left              = $00000001;
  1358.   mci_Set_Audio_Right             = $00000002;
  1359.  
  1360. { flags for dwFlags parameter of MCI_BREAK command message }
  1361. const
  1362.   mci_Break_Key                   = $00000100;
  1363.   mci_Break_HWnd                  = $00000200;
  1364.   mci_Break_Off                   = $00000400;
  1365.  
  1366. { flags for dwFlags parameter of MCI_RECORD command message }
  1367. const
  1368.   mci_Record_Insert               = $00000100;
  1369.   mci_Record_Overwrite            = $00000200;
  1370.  
  1371. { flags for dwFlags parameter of MCI_SOUND command message }
  1372. const
  1373.   mci_Sound_Name                  = $00000100;
  1374.  
  1375. { flags for dwFlags parameter of MCI_SAVE command message }
  1376. const
  1377.   mci_Save_File                   = $00000100;
  1378.  
  1379. { flags for dwFlags parameter of MCI_LOAD command message }
  1380. const
  1381.   mci_Load_File                   = $00000100;
  1382.  
  1383. { generic parameter block for MCI command messages with no special parameters }
  1384. type
  1385.   PMCI_Generic_Parms = ^TMCI_Generic_Parms;
  1386.   TMCI_Generic_Parms = record
  1387.     dwCallback: Longint;
  1388.   end;
  1389.  
  1390. { parameter block for MCI_OPEN command message }
  1391. type
  1392.   PMCI_Open_Params = ^TMCI_Open_Params;
  1393.   TMCI_Open_Params = record
  1394.     dwCallback: Longint;
  1395.     wDeviceID: Word;
  1396.     wReserved0: Word;
  1397.     lpstrDeviceType: PChar;
  1398.     lpstrElementName: PChar;
  1399.     lpstrAlias: PChar;
  1400.   end;
  1401.  
  1402. { parameter block for MCI_PLAY command message }
  1403. type
  1404.   PMCI_Play_Parms = ^TMCI_Play_Parms;
  1405.   TMCI_Play_Parms = record
  1406.     dwCallback: Longint;
  1407.     dwFrom: Longint;
  1408.     dwTo: Longint;
  1409.   end;
  1410.  
  1411. { parameter block for MCI_SEEK command message }
  1412. type
  1413.   PMCI_Seek_Parms = ^TMCI_Seek_Parms;
  1414.   TMCI_Seek_Parms = record
  1415.     dwCallback: Longint;
  1416.     dwTo: Longint;
  1417.   end;
  1418.  
  1419.  
  1420. { parameter block for MCI_STATUS command message }
  1421. type
  1422.   PMCI_Status_Parms = ^TMCI_Status_Parms;
  1423.   TMCI_Status_Parms = record
  1424.     dwCallback: Longint;
  1425.     dwReturn: Longint;
  1426.     dwItem: Longint;
  1427.     dwTrack: Longint;
  1428.   end;
  1429.  
  1430. { parameter block for MCI_INFO command message }
  1431. type
  1432.   PMCI_Info_Parms = ^TMCI_Info_Parms;
  1433.   TMCI_Info_Parms = record
  1434.     dwCallback: Longint;
  1435.     lpstrReturn: PChar;
  1436.     dwRetSize: Longint;
  1437.   end;
  1438.  
  1439. { parameter block for MCI_GETDEVCAPS command message }
  1440. type
  1441.   PMCI_GetDevCaps_Parms = ^TMCI_GetDevCaps_Parms;
  1442.   TMCI_GetDevCaps_Parms = record
  1443.     dwCallback: Longint;
  1444.     dwReturn: Longint;
  1445.     dwItem: Longint;
  1446.   end;
  1447.  
  1448.  
  1449. { parameter block for MCI_SYSINFO command message }
  1450. type
  1451.   PMCI_SysInfo_Parms = ^TMCI_SysInfo_Parms;
  1452.   TMCI_SysInfo_Parms = record
  1453.     dwCallback: Longint;
  1454.     lpstrReturn: PChar;
  1455.     dwRetSize: Longint;
  1456.     dwNumber: Longint;
  1457.     wDeviceType: Word;
  1458.     wReserved0: Word;
  1459.   end;
  1460.  
  1461. { parameter block for MCI_SET command message }
  1462. type
  1463.   PMCI_Set_Parms = ^TMCI_Set_Parms;
  1464.   TMCI_Set_Parms = record
  1465.     dwCallback: Longint;
  1466.     dwTimeFormat: Longint;
  1467.     dwAudio: Longint;
  1468.   end;
  1469.  
  1470.  
  1471. { parameter block for MCI_BREAK command message }
  1472. type
  1473.   PMCI_Break_Parms = ^TMCI_BReak_Parms;
  1474.   TMCI_BReak_Parms = record
  1475.     dwCallback: Longint;
  1476.     nVirtKey: Integer;
  1477.     wReserved0: Word;
  1478.     hWndBreak: HWnd;
  1479.     wReserved1: Word;
  1480.   end;
  1481.  
  1482. { parameter block for MCI_SOUND command message }
  1483. type
  1484.   PMCI_Sound_Parms = ^TMCI_Sound_Parms;
  1485.   TMCI_Sound_Parms = record
  1486.     dwCallback: Longint;
  1487.     lpstrSoundName: PChar;
  1488.   end;
  1489.  
  1490. { parameter block for MCI_SAVE command message }
  1491. type
  1492.   PMCI_Save_Parms = ^TMCI_SaveParms;
  1493.   TMCI_SaveParms = record
  1494.     dwCallback: Longint;
  1495.     lpfilename: PChar;
  1496.   end;
  1497.  
  1498. { parameter block for MCI_LOAD command message }
  1499. type
  1500.   PMCI_Load_Params = ^TMCI_Load_Params;
  1501.   TMCI_Load_Params = record
  1502.     dwCallback: Longint;
  1503.     lpfilename: PChar;
  1504.   end;
  1505.  
  1506. { parameter block for MCI_RECORD command message }
  1507. type
  1508.   PMCI_Record_Parms = ^TMCI_Record_Parms;
  1509.   TMCI_Record_Parms = record
  1510.     dwCallback: Longint;
  1511.     dwFrom: Longint;
  1512.     dwTo: Longint;
  1513.   end;
  1514.  
  1515.  
  1516. { MCI extensions for videodisc devices }
  1517.  
  1518. { flag for dwReturn field of MCI_STATUS_PARMS }
  1519. { MCI_STATUS command, (dwItem == MCI_STATUS_MODE) }
  1520. const
  1521.   mci_VD_Mode_Park                = mci_VD_Offset + 1;
  1522.  
  1523. { flag for dwReturn field of MCI_STATUS_PARMS }
  1524. { MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) }
  1525. const
  1526.   mci_VD_Media_CLV                = mci_VD_Offset + 2;
  1527.   mci_VD_Media_CAV                = mci_VD_Offset + 3;
  1528.   mci_VD_Media_Other              = mci_VD_Offset + 4;
  1529.  
  1530. const
  1531.   mci_VD_Format_Track             = $4001;
  1532.  
  1533. { flags for dwFlags parameter of MCI_PLAY command message }
  1534. const
  1535.   mci_VD_Play_Reverse             = $00010000;
  1536.   mci_VD_Play_Fast                = $00020000;
  1537.   mci_VD_Play_Speed               = $00040000;
  1538.   mci_VD_Play_Scan                = $00080000;
  1539.   mci_VD_Play_Slow                = $00100000;
  1540.  
  1541. { flag for dwFlags parameter of MCI_SEEK command message }
  1542. const
  1543.   mci_VD_Seek_Reverse             = $00010000;
  1544.  
  1545. { flags for dwItem field of MCI_STATUS_PARMS parameter block }
  1546. const
  1547.   mci_VD_Status_Speed             = $00004002;
  1548.   mci_VD_Status_Forward           = $00004003;
  1549.   mci_VD_Status_Media_Type        = $00004004;
  1550.   mci_VD_Status_Side              = $00004005;
  1551.   mci_VD_Status_Disc_Size         = $00004006;
  1552.  
  1553. { flags for dwFlags parameter of MCI_GETDEVCAPS command message }
  1554. const
  1555.   mci_VD_GetDevCaps_CLV           = $00010000;
  1556.   mci_VD_GetDevCaps_CAV           = $00020000;
  1557.  
  1558.   mci_VD_Spin_Up                  = $00010000;
  1559.   mci_VD_Spin_Down                = $00020000;
  1560.  
  1561. { flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
  1562. const
  1563.   mci_VD_GetDevCaps_Can_Reverse   = $00004002;
  1564.   mci_VD_GetDevCaps_Fast_Rate     = $00004003;
  1565.   mci_VD_GetDevCaps_Slow_Rate     = $00004004;
  1566.   mci_VD_GetDevCaps_Normal_Rate   = $00004005;
  1567.  
  1568. { flags for the dwFlags parameter of MCI_STEP command message }
  1569. const
  1570.   mci_VD_Step_Frames              = $00010000;
  1571.   mci_VD_Step_Reverse             = $00020000;
  1572.  
  1573. { flag for the MCI_ESCAPE command message }
  1574. const
  1575.   mci_VD_Escape_String            = $00000100;
  1576.  
  1577. { parameter block for MCI_PLAY command message }
  1578. type
  1579.   PMCI_VD_Play_Parms = ^TMCI_VD_Play_Parms;
  1580.   TMCI_VD_Play_Parms = record
  1581.     dwCallback: Longint;
  1582.     dwFrom: Longint;
  1583.     dwTo: Longint;
  1584.     dwSpeed: Longint;
  1585.   end;
  1586.  
  1587. { parameter block for MCI_STEP command message }
  1588. type
  1589.   PMCI_VD_Step_Parms = ^TMCI_VD_Step_Parms;
  1590.   TMCI_VD_Step_Parms = record
  1591.     dwCallback: Longint;
  1592.     dwFrames: Longint;
  1593.   end;
  1594.  
  1595. { parameter block for MCI_ESCAPE command message }
  1596. type
  1597.   PMCI_VD_Escape_Parms = ^TMCI_VD_Escape_Parms;
  1598.   TMCI_VD_Escape_Parms = record
  1599.     dwCallback: Longint;
  1600.     lpstrCommand: PChar;
  1601.   end;
  1602.  
  1603.  
  1604. { MCI extensions for waveform audio devices }
  1605.  
  1606. { flags for the dwFlags parameter of MCI_OPEN command message }
  1607. const
  1608.   mci_Wave_Open_Buffer            = $00010000;
  1609.  
  1610. { flags for the dwFlags parameter of MCI_SET command message }
  1611. const
  1612.   mci_Wave_Set_FormatTag          = $00010000;
  1613.   mci_Wave_Set_Channels           = $00020000;
  1614.   mci_Wave_Set_SamplesPerSec      = $00040000;
  1615.   mci_Wave_Set_AvgBytesPerSec     = $00080000;
  1616.   mci_Wave_Set_BlockAlign         = $00100000;
  1617.   mci_Wave_Set_BitsPerSample      = $00200000;
  1618.  
  1619. { flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages }
  1620. const
  1621.   mci_Wave_Input                  = $00400000;
  1622.   mci_Wave_Output                 = $00800000;
  1623.  
  1624. { flags for the dwItem field of MCI_STATUS_PARMS parameter block }
  1625. const
  1626.   mci_Wave_Status_FormatTag       = $00004001;
  1627.   mci_Wave_Status_Channels        = $00004002;
  1628.   mci_Wave_Status_SamplesPerSec   = $00004003;
  1629.   mci_Wave_Status_AvgBytesPerSec  = $00004004;
  1630.   mci_Wave_Status_BlockAlign      = $00004005;
  1631.   mci_Wave_Status_BitsPerSample   = $00004006;
  1632.   mci_Wave_Status_Level           = $00004007;
  1633.  
  1634. { flags for the dwFlags parameter of MCI_SET command message }
  1635. const
  1636.   mci_Wave_Set_AnyInput           = $04000000;
  1637.   mci_Wave_Set_AnyOutput          = $08000000;
  1638.  
  1639. { flags for the dwFlags parameter of MCI_GETDEVCAPS command message }
  1640. const
  1641.   mci_Wave_GetDevCaps_Inputs      = $00004001;
  1642.   mci_Wave_GetDevCaps_Outputs     = $00004002;
  1643.  
  1644. { parameter block for MCI_OPEN command message }
  1645. type
  1646.   PMCI_Wave_Open_Parms = ^TMCI_Wave_Open_Parms;
  1647.   TMCI_Wave_Open_Parms = record
  1648.     dwCallback: Longint;
  1649.     wDeviceID: Word;
  1650.     wReserved0: Word;
  1651.     lpstrDeviceType: PChar;
  1652.     lpstrElementName: PChar;
  1653.     lpstrAlias: PChar;
  1654.     dwBufferSeconds: Longint;
  1655.   end;
  1656.  
  1657. { parameter block for MCI_DELETE command message }
  1658. type
  1659.   PMCI_Wave_Delete_Parms = ^TMCI_Wave_Delete_Parms;
  1660.   TMCI_Wave_Delete_Parms = record
  1661.     dwCallback: Longint;
  1662.     dwFrom: Longint;
  1663.     dwTo: Longint;
  1664.   end;
  1665.  
  1666. { parameter block for MCI_SET command message }
  1667. type
  1668.   PMCI_Wave_Set_Parms = ^TMCI_Wave_Set_Parms;
  1669.   TMCI_Wave_Set_Parms = record
  1670.     dwCallback: Longint;
  1671.     dwTimeFormat: Longint;
  1672.     dwAudio: Longint;
  1673.     wInput: Word;
  1674.     wReserved0: Word;
  1675.     wOutput: Word;
  1676.     wReserved1: Word;
  1677.     wFormatTag: Word;
  1678.     wReserved2: Word;
  1679.     nChannels: Word;
  1680.     wReserved3: Word;
  1681.     nSamplesPerSec: Longint;
  1682.     nAvgBytesPerSec: Longint;
  1683.     nBlockAlign: Word;
  1684.     wReserved4: Word;
  1685.     wBitsPerSample: Word;
  1686.     wReserved5: Word;
  1687.   end;
  1688.  
  1689.  
  1690. { MCI extensions for MIDI sequencer devices }
  1691.  
  1692. { flags for the dwReturn field of MCI_STATUS_PARMS parameter block }
  1693. { MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) }
  1694. const
  1695.   mci_Seq_Div_PPQN            = 0 + mci_Seq_Offset;
  1696.   mci_Seq_Div_SMPTE_24        = 1 + mci_Seq_Offset;
  1697.   mci_Seq_Div_SMPTE_25        = 2 + mci_Seq_Offset;
  1698.   mci_Seq_Div_SMPTE_30Drop    = 3 + mci_Seq_Offset;
  1699.   mci_Seq_Div_SMPTE_30        = 4 + mci_Seq_Offset;
  1700.  
  1701. { flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block }
  1702. { MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) }
  1703. const
  1704.   mci_Seq_Format_SongPtr      = $4001;
  1705.   mci_Seq_File                = $4002;
  1706.   mci_Seq_MIDI                = $4003;
  1707.   mci_Seq_SMPTE               = $4004;
  1708.   mci_Seq_None                = 65533;
  1709.  
  1710. { flags for the dwItem field of MCI_STATUS_PARMS parameter block }
  1711. const
  1712.   mci_Seq_Status_Tempo            = $00004002;
  1713.   mci_Seq_Status_Port             = $00004003;
  1714.   mci_Seq_Status_Slave            = $00004007;
  1715.   mci_Seq_Status_Master           = $00004008;
  1716.   mci_Seq_Status_Offset           = $00004009;
  1717.   mci_Seq_Status_DivType          = $0000400A;
  1718.  
  1719. { flags for the dwFlags parameter of MCI_SET command message }
  1720. const
  1721.   mci_Seq_Set_Tempo               = $00010000;
  1722.   mci_Seq_Set_Port                = $00020000;
  1723.   mci_Seq_Set_Slave               = $00040000;
  1724.   mci_Seq_Set_Master              = $00080000;
  1725.   mci_Seq_Set_Offset              = $01000000;
  1726.  
  1727. { parameter block for MCI_SET command message }
  1728. type
  1729.   PMCI_Seq_Set_Parms = ^TMCI_Seq_Set_Parms;
  1730.   TMCI_Seq_Set_Parms = record
  1731.     dwCallback: Longint;
  1732.     dwTimeFormat: Longint;
  1733.     dwAudio: Longint;
  1734.     dwTempo: Longint;
  1735.     dwPort: Longint;
  1736.     dwSlave: Longint;
  1737.     dwMaster: Longint;
  1738.     dwOffset: Longint;
  1739.   end;
  1740.  
  1741.  
  1742. { MCI extensions for animation devices }
  1743.  
  1744. { flags for dwFlags parameter of MCI_OPEN command message }
  1745. const
  1746.   mci_Anim_Open_WS                = $00010000;
  1747.   mci_Anim_Open_Parent            = $00020000;
  1748.   mci_Anim_Open_NoStatic          = $00040000;
  1749.  
  1750. { flags for dwFlags parameter of MCI_PLAY command message }
  1751. const
  1752.   mci_Anim_Play_Speed             = $00010000;
  1753.   mci_Anim_Play_Reverse           = $00020000;
  1754.   mci_Anim_Play_Fast              = $00040000;
  1755.   mci_Anim_Play_Slow              = $00080000;
  1756.   mci_Anim_Play_Scan              = $00100000;
  1757.  
  1758. { flags for dwFlags parameter of MCI_STEP command message }
  1759. const
  1760.   mci_Anim_Step_Reverse           = $00010000;
  1761.   mci_Anim_Step_Frames            = $00020000;
  1762.  
  1763. { flags for dwItem field of MCI_STATUS_PARMS parameter block }
  1764. const
  1765.   mci_Anim_Status_Speed           = $00004001;
  1766.   mci_Anim_Status_Forward         = $00004002;
  1767.   mci_Anim_Status_HWnd            = $00004003;
  1768.   mci_Anim_Status_HPal            = $00004004;
  1769.   mci_Anim_Status_Stretch         = $00004005;
  1770.  
  1771. { flags for the dwFlags parameter of MCI_INFO command message }
  1772. const
  1773.   mci_Anim_Info_Text              = $00010000;
  1774.  
  1775. { flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
  1776. const
  1777.   mci_Anim_GetDevCaps_Can_Reverse = $00004001;
  1778.   mci_Anim_GetDevCaps_Fast_Rate   = $00004002;
  1779.   mci_Anim_GetDevCaps_Slow_Rate   = $00004003;
  1780.   mci_Anim_GetDevCaps_Normal_Rate = $00004004;
  1781.   mci_Anim_GetDevCaps_Palettes    = $00004006;
  1782.   mci_Anim_GetDevCaps_Can_Stretch = $00004007;
  1783.   mci_Anim_GetDevCaps_Max_Windows = $00004008;
  1784.  
  1785. { flags for the MCI_REALIZE command message }
  1786. const
  1787.   mci_Anim_Realize_Norm           = $00010000;
  1788.   mci_Anim_Realize_Bkgd           = $00020000;
  1789.  
  1790. { flags for dwFlags parameter of MCI_WINDOW command message }
  1791. const
  1792.   mci_Anim_Window_HWnd            = $00010000;
  1793.   mci_Anim_Window_State           = $00040000;
  1794.   mci_Anim_Window_Text            = $00080000;
  1795.   mci_Anim_Window_Enable_Stretch  = $00100000;
  1796.   mci_Anim_Window_Disable_Stretch = $00200000;
  1797.  
  1798. { flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block }
  1799. { MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) }
  1800. const
  1801.   mci_Anim_Window_Default         = $00000000;
  1802.  
  1803. { flags for dwFlags parameter of MCI_PUT command message }
  1804. const
  1805.   mci_Anim_RECT                   = $00010000;
  1806.   mci_Anim_Put_Source             = $00020000;
  1807.   mci_Anim_Put_Destination        = $00040000;
  1808.  
  1809. { flags for dwFlags parameter of MCI_WHERE command message }
  1810. const
  1811.   mci_Anim_Where_Source           = $00020000;
  1812.   mci_Anim_Where_Destination      = $00040000;
  1813.  
  1814. { flags for dwFlags parameter of MCI_UPDATE command message }
  1815. const
  1816.   mci_Anim_Update_HDC             = $00020000;
  1817.  
  1818. { parameter block for MCI_OPEN command message }
  1819. type
  1820.   PMCI_Anim_Open_Parms = ^TMCI_Anim_Open_Parms;
  1821.   TMCI_Anim_Open_Parms = record
  1822.     dwCallback: Longint;
  1823.     wDeviceID: Word;
  1824.     wReserved0: Word;
  1825.     lpstrDeviceType: PChar;
  1826.     lpstrElementName: PChar;
  1827.     lpstrAlias: PChar;
  1828.     dwStyle: Longint;
  1829.     hWndParent: HWnd;
  1830.     wReserved1: Word;
  1831.   end;
  1832.  
  1833. { parameter block for MCI_PLAY command message }
  1834. type
  1835.   PMCI_Anim_Play_Parms = ^TMCI_Anim_Play_Parms;
  1836.   TMCI_Anim_Play_Parms = record
  1837.     dwCallback: Longint;
  1838.     dwFrom: Longint;
  1839.     dwTo: Longint;
  1840.     dwSpeed: Longint;
  1841.   end;
  1842.  
  1843. { parameter block for MCI_STEP command message }
  1844. type
  1845.   PMCI_Anim_Step_Parms = ^TMCI_Anim_Step_Parms;
  1846.   TMCI_Anim_Step_Parms = record
  1847.     dwCallback: Longint;
  1848.     dwFrames: Longint;
  1849.   end;
  1850.  
  1851. { parameter block for MCI_WINDOW command message }
  1852. type
  1853.   PMCI_Anim_Window_Parms = ^TMCI_Anim_Window_Parms;
  1854.   TMCI_Anim_Window_Parms = record
  1855.     dwCallback: Longint;
  1856.     Wnd: HWnd;  { formerly "hWnd" }
  1857.     wReserved1: Word;
  1858.     nCmdShow: Word;
  1859.     wReserved2: Word;
  1860.     lpstrText: PChar;
  1861.   end;
  1862.  
  1863. { parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages }
  1864. type
  1865.   PMCI_Anim_Rect_Parms = ^ TMCI_Anim_Rect_Parms;
  1866.   TMCI_Anim_Rect_Parms = record
  1867.     dwCallback: Longint;
  1868.     rc: TRect;
  1869.   end;
  1870.  
  1871. { parameter block for MCI_UPDATE PARMS }
  1872. type
  1873.   PMCI_Anim_Update_Parms = ^TMCI_Anim_Update_Parms;
  1874.   TMCI_Anim_Update_Parms = record
  1875.     dwCallback: Longint;
  1876.     rc: TRect;
  1877.     hDC: HDC;
  1878.   end;
  1879.  
  1880.  
  1881. { MCI extensions for video overlay devices }
  1882.  
  1883. { flags for dwFlags parameter of MCI_OPEN command message }
  1884. const
  1885.   mci_Ovly_Open_WS                = $00010000;
  1886.   mci_Ovly_Open_Parent            = $00020000;
  1887.  
  1888. { flags for dwFlags parameter of MCI_STATUS command message }
  1889. const
  1890.   mci_Ovly_Status_HWnd            = $00004001;
  1891.   mci_Ovly_Status_Stretch         = $00004002;
  1892.  
  1893. { flags for dwFlags parameter of MCI_INFO command message }
  1894. const
  1895.   mci_Ovly_Info_Text              = $00010000;
  1896.  
  1897. { flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block }
  1898. const
  1899.   mci_Ovly_GetDevCaps_Can_Stretch = $00004001;
  1900.   mci_Ovly_GetDevCaps_Can_Freeze  = $00004002;
  1901.   mci_Ovly_GetDevCaps_Max_Windows = $00004003;
  1902.  
  1903. { flags for dwFlags parameter of MCI_WINDOW command message }
  1904. const
  1905.   mci_Ovly_Window_HWnd            = $00010000;
  1906.   mci_Ovly_Window_State           = $00040000;
  1907.   mci_Ovly_Window_Text            = $00080000;
  1908.   mci_Ovly_Window_Enable_Stretch  = $00100000;
  1909.   mci_Ovly_Window_Disable_Stretch = $00200000;
  1910.  
  1911. { flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block }
  1912. const
  1913.   mci_Ovly_Window_Default         = $00000000;
  1914.  
  1915. { flags for dwFlags parameter of MCI_PUT command message }
  1916. const
  1917.   mci_Ovly_Rect                   = $00010000;
  1918.   mci_Ovly_Put_Source             = $00020000;
  1919.   mci_Ovly_Put_Destination        = $00040000;
  1920.   mci_Ovly_Put_Frame              = $00080000;
  1921.   mci_Ovly_Put_Video              = $00100000;
  1922.  
  1923. { flags for dwFlags parameter of MCI_WHERE command message }
  1924. const
  1925.   mci_Ovly_Where_Source           = $00020000;
  1926.   mci_Ovly_Where_Destination      = $00040000;
  1927.   mci_Ovly_Where_Frame            = $00080000;
  1928.   mci_Ovly_Where_Video            = $00100000;
  1929.  
  1930. { parameter block for MCI_OPEN command message }
  1931. type
  1932.   PMCI_Ovly_Open_Parms = ^TMCI_Ovly_Open_Parms;
  1933.   TMCI_Ovly_Open_Parms = record
  1934.     dwCallback: Longint;
  1935.     wDeviceID: Word;
  1936.     wReserved0: Word;
  1937.     lpstrDeviceType: PChar;
  1938.     lpstrElementName: PChar;
  1939.     lpstrAlias: PChar;
  1940.     dwStyle: Longint;
  1941.     hWndParent: HWnd;
  1942.     wReserved1: Word;
  1943.   end;
  1944.  
  1945. { parameter block for MCI_WINDOW command message }
  1946. type
  1947.   PMCI_Ovly_Window_Parms = ^TMCI_Ovly_Window_Parms;
  1948.   TMCI_Ovly_Window_Parms = record
  1949.     dwCallback: Longint;
  1950.     WHandle: HWnd; { formerly "hWnd"}
  1951.     wReserved1: Word;
  1952.     nCmdShow: Word;
  1953.     wReserved2: Word;
  1954.     lpstrText: PChar;
  1955.   end;
  1956.  
  1957. { parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages }
  1958. type
  1959.   PMCI_Ovly_Rect_Parms = ^ TMCI_Ovly_Rect_Parms;
  1960.   TMCI_Ovly_Rect_Parms = record
  1961.     dwCallback: Longint;
  1962.     rc: TRect;
  1963.   end;
  1964.  
  1965. { parameter block for MCI_SAVE command message }
  1966. type
  1967.   PMCI_Ovly_Save_Parms = ^TMCI_Ovly_Save_Parms;
  1968.   TMCI_Ovly_Save_Parms = record
  1969.     dwCallback: Longint;
  1970.     lpfilename: PChar;
  1971.     rc: TRect;
  1972.   end;
  1973.  
  1974. { parameter block for MCI_LOAD command message }
  1975. type
  1976.   PMCI_Ovly_Load_Parms = ^TMCI_Ovly_Load_Parms;
  1977.   TMCI_Ovly_Load_Parms = record
  1978.     dwCallback: Longint;
  1979.     lpfilename: PChar;
  1980.     rc: TRect;
  1981.   end;
  1982.  
  1983.  
  1984. {***************************************************************************
  1985.  
  1986.                         DISPLAY Driver extensions
  1987.  
  1988. ***************************************************************************}
  1989.  
  1990. const
  1991.   Caps1           = 94;          { other caps }
  1992.   c1_Transparent  = $0001;       { new raster cap }
  1993.   NewTransparent  = 3;           { use with SetBkMode() }
  1994.   QueryrOPSupport = 40;          { use to determine ROP support }
  1995.  
  1996. {***************************************************************************
  1997.  
  1998.                         DIB Driver extensions
  1999.  
  2000. ***************************************************************************}
  2001. const
  2002.   SelectDIB       = 41;                      { DIB.DRV select dib escape }
  2003.  
  2004. function DIBIndex(N: Integer): LongInt;
  2005. inline(
  2006.   $58/          { POP   AX }
  2007.   $BA/$FF/$10); { MOV   DX,10FFH }
  2008.  
  2009. {***************************************************************************
  2010.  
  2011.                         ScreenSaver support
  2012.  
  2013.     The current application will receive a syscommand of SC_SCREENSAVE just
  2014.     before the screen saver is invoked.  If the app wishes to prevent a
  2015.     screen save, return non-zero value, otherwise call DefWindowProc().
  2016.  
  2017. ***************************************************************************}
  2018.  
  2019. const
  2020.   sc_ScreenSave   = $F140;
  2021.  
  2022. implementation
  2023.  
  2024. function mmsystemGetVersion;                 external 'MMSYSTEM' index 5;
  2025. procedure OutputDebugStr;                    external 'MMSYSTEM' index 30;
  2026. function sndPlaySound;                       external 'MMSYSTEM' index 2;
  2027. function waveOutGetNumDevs;                  external 'MMSYSTEM' index 401;
  2028. function waveOutGetDevCaps;                  external 'MMSYSTEM' index 402;
  2029. function waveOutGetVolume;                   external 'MMSYSTEM' index 415;
  2030. function waveOutSetVolume;                   external 'MMSYSTEM' index 416;
  2031. function waveOutGetErrorText;                external 'MMSYSTEM' index 403;
  2032. function waveOutOpen;                        external 'MMSYSTEM' index 404;
  2033. function waveOutClose;                       external 'MMSYSTEM' index 405;
  2034. function waveOutPrepareHeader;               external 'MMSYSTEM' index 406;
  2035. function waveOutUnprepareHeader;             external 'MMSYSTEM' index 407;
  2036. function waveOutWrite;                       external 'MMSYSTEM' index 408;
  2037. function waveOutPause;                       external 'MMSYSTEM' index 409;
  2038. function waveOutRestart;                     external 'MMSYSTEM' index 410;
  2039. function waveOutReset;                       external 'MMSYSTEM' index 411;
  2040. function waveOutBreakLoop;                   external 'MMSYSTEM' index 419;
  2041. function waveOutGetPosition;                 external 'MMSYSTEM' index 412;
  2042. function waveOutGetPitch;                    external 'MMSYSTEM' index 413;
  2043. function waveOutSetPitch;                    external 'MMSYSTEM' index 414;
  2044. function waveOutGetPlaybackRate;             external 'MMSYSTEM' index 417;
  2045. function waveOutSetPlaybackRate;             external 'MMSYSTEM' index 418;
  2046. function waveOutGetID;                       external 'MMSYSTEM' index 420;
  2047. function waveOutMessage;                     external 'MMSYSTEM' index 421;
  2048. function waveInGetNumDevs;                   external 'MMSYSTEM' index 501;
  2049. function waveInGetDevCaps;                   external 'MMSYSTEM' index 502;
  2050. function waveInGetErrorText;                 external 'MMSYSTEM' index 503;
  2051. function waveInOpen;                         external 'MMSYSTEM' index 504;
  2052. function waveInClose;                        external 'MMSYSTEM' index 505;
  2053. function waveInPrepareHeader;                external 'MMSYSTEM' index 506;
  2054. function waveInUnprepareHeader;              external 'MMSYSTEM' index 507;
  2055. function waveInAddBuffer;                    external 'MMSYSTEM' index 508;
  2056. function waveInStart;                        external 'MMSYSTEM' index 509;
  2057. function waveInStop;                         external 'MMSYSTEM' index 510;
  2058. function waveInReset;                        external 'MMSYSTEM' index 511;
  2059. function waveInGetPosition;                  external 'MMSYSTEM' index 512;
  2060. function waveInGetID;                        external 'MMSYSTEM' index 513;
  2061. function waveInMessage;                      external 'MMSYSTEM' index 514;
  2062. function midiOutGetNumDevs;                  external 'MMSYSTEM' index 201;
  2063. function midiOutGetDevCaps;                  external 'MMSYSTEM' index 202;
  2064. function midiOutGetVolume;                   external 'MMSYSTEM' index 211;
  2065. function midiOutSetVolume;                   external 'MMSYSTEM' index 212;
  2066. function midiOutGetErrorText;                external 'MMSYSTEM' index 203;
  2067. function midiOutOpen;                        external 'MMSYSTEM' index 204;
  2068. function midiOutClose;                       external 'MMSYSTEM' index 205;
  2069. function midiOutPrepareHeader;               external 'MMSYSTEM' index 206;
  2070. function midiOutUnprepareHeader;             external 'MMSYSTEM' index 207;
  2071. function midiOutShortMsg;                    external 'MMSYSTEM' index 208;
  2072. function midiOutLongMsg;                     external 'MMSYSTEM' index 209;
  2073. function midiOutReset;                       external 'MMSYSTEM' index 210;
  2074. function midiOutCachePatches;                external 'MMSYSTEM' index 213;
  2075. function midiOutCacheDrumPatches;            external 'MMSYSTEM' index 214;
  2076. function midiOutGetID;                       external 'MMSYSTEM' index 215;
  2077. function midiOutMessage;                     external 'MMSYSTEM' index 216;
  2078. function midiInGetNumDevs;                   external 'MMSYSTEM' index 301;
  2079. function midiInGetDevCaps;                   external 'MMSYSTEM' index 302;
  2080. function midiInGetErrorText;                 external 'MMSYSTEM' index 303;
  2081. function midiInOpen;                         external 'MMSYSTEM' index 304;
  2082. function midiInClose;                        external 'MMSYSTEM' index 305;
  2083. function midiInPrepareHeader;                external 'MMSYSTEM' index 306;
  2084. function midiInUnprepareHeader;              external 'MMSYSTEM' index 307;
  2085. function midiInAddBuffer;                    external 'MMSYSTEM' index 308;
  2086. function midiInStart;                        external 'MMSYSTEM' index 309;
  2087. function midiInStop;                         external 'MMSYSTEM' index 310;
  2088. function midiInReset;                        external 'MMSYSTEM' index 311;
  2089. function midiInGetID;                        external 'MMSYSTEM' index 312;
  2090. function midiInMessage;                      external 'MMSYSTEM' index 313;
  2091. function auxGetNumDevs;                      external 'MMSYSTEM' index 350;
  2092. function auxGetDevCaps;                      external 'MMSYSTEM' index 351;
  2093. function auxSetVolume;                       external 'MMSYSTEM' index 353;
  2094. function auxGetVolume;                       external 'MMSYSTEM' index 352;
  2095. function auxOutMessage;                      external 'MMSYSTEM' index 354;
  2096. function timeGetSystemTime;                  external 'MMSYSTEM' index 601;
  2097. function timeGetTime;                        external 'MMSYSTEM' index 607;
  2098. function timeSetEvent;                       external 'MMSYSTEM' index 602;
  2099. function timeKillEvent;                      external 'MMSYSTEM' index 603;
  2100. function timeGetDevCaps;                     external 'MMSYSTEM' index 604;
  2101. function timeBeginPeriod;                    external 'MMSYSTEM' index 605;
  2102. function timeEndPeriod;                      external 'MMSYSTEM' index 606;
  2103. function joyGetDevCaps;                      external 'MMSYSTEM' index 102;
  2104. function joyGetNumDevs;                      external 'MMSYSTEM' index 101;
  2105. function joyGetPos;                          external 'MMSYSTEM' index 103;
  2106. function joyGetThreshold;                    external 'MMSYSTEM' index 104;
  2107. function joyReleaseCapture;                  external 'MMSYSTEM' index 105;
  2108. function joySetCapture;                      external 'MMSYSTEM' index 106;
  2109. function joySetThreshold;                    external 'MMSYSTEM' index 107;
  2110. function mmioStringToFOURCC;                 external 'MMSYSTEM' index 1220;
  2111. function mmioInstallIOProc;                  external 'MMSYSTEM' index 1221;
  2112. function mmioOpen;                           external 'MMSYSTEM' index 1210;
  2113. function mmioRename;                         external 'MMSYSTEM' index 1226;
  2114. function mmioClose;                          external 'MMSYSTEM' index 1211;
  2115. function mmioRead;                           external 'MMSYSTEM' index 1212;
  2116. function mmioWrite;                          external 'MMSYSTEM' index 1213;
  2117. function mmioSeek;                           external 'MMSYSTEM' index 1214;
  2118. function mmioGetInfo;                        external 'MMSYSTEM' index 1215;
  2119. function mmioSetInfo;                        external 'MMSYSTEM' index 1216;
  2120. function mmioSetBuffer;                      external 'MMSYSTEM' index 1217;
  2121. function mmioFlush;                          external 'MMSYSTEM' index 1218;
  2122. function mmioAdvance;                        external 'MMSYSTEM' index 1219;
  2123. function mmioSendMessage;                    external 'MMSYSTEM' index 1222;
  2124. function mmioDescend;                        external 'MMSYSTEM' index 1223;
  2125. function mmioAscend;                         external 'MMSYSTEM' index 1224;
  2126. function mmioCreateChunk;                    external 'MMSYSTEM' index 1225;
  2127. function mciSendCommand;                     external 'MMSYSTEM' index 701;
  2128. function mciSendString;                      external 'MMSYSTEM' index 702;
  2129. function mciGetDeviceID;                     external 'MMSYSTEM' index 703;
  2130. function mciGetDeviceIDFromElementID;        external 'MMSYSTEM' index 715;
  2131. function mciGetErrorString;                  external 'MMSYSTEM' index 706;
  2132. function mciSetYieldProc;                    external 'MMSYSTEM' index 714;
  2133. function mciGetCreatorTask;                  external 'MMSYSTEM' index 717;
  2134. function mciGetYieldProc;                    external 'MMSYSTEM' index 716;
  2135.  
  2136. end.
  2137.